Table of Contents
This tutorial requires the ARM GNU tools, which are part of the Xilinx Software Development Kit (SDK), to be installed on your host system. Specify the ARM cross-compiler by setting the CROSS_COMPILE environment variable and adding the cross-compiler to your PATH. Refer to the Zynq Tools wiki page for more information on how to set up the tool chain and known issues.
Note: These instructions currently require a Linux host for building.
For simplicity we define two environment variables in this tutorial:
- ZYNQ_QT_BUILD refers to the Qt build area
- ZYNQ_QT_INSTALL refers to the Qt install area
Qt is a C++ framework for GUI application development. With the release of Qt 5.0, Qt no longer contains its own window system implementation. The Qt Platform Abstraction (QPA) provides multiple platform plugins that are potentially usable on Embedded Linux systems: EGLFS, LinuxFB, DirectFB, Wayland. In this tutorial we configure Qt to use the LinuxFB plugin which is well suited for embedded devices without GPU running Linux. For more information on Qt for embedded Linux see here .
Download the Qt Source Archive
Download the Qt sources and extract the archive to your Qt build area.
Prepare a mkspec
Before we can do the configuration for the target system, we need to create a mkspec that tells qmake which tool chain it should reference when it creates the Makefiles. In this example we provide a mkspec for the ARM Xilinx Linux GNU tools. The mkspec consists of two files:
qmake.conf – This is a list of qmake variable assignments that tells qmake which compiler to use
qplatformdefs.h – This is a header file with various platform-specific #includes and #defines. In our case we just reference the qplatformdefs.h file from a generic Linux mkspec
Download the files from the links below and create a new mkspec in the QtBase module.
Configure the Target Build
We are now ready to configure Qt with the packages/modules required for the Base TRD based on the tool chain specified in our mkspec.
Here is some information on some of the options that appear:
For more information on specific Qt modules refer to this page
Build and Install
Run make to build the cross-compiled target version of Qt.
Once the build has completed it is time to install Qt. You may need to su to root to do this part depending upon what prefix you configured the build with.
Qwt - Qt Widgets for Technical Applications - contains GUI Components and utility classes which are primarily useful for programs with a technical background. Beside a 2D plot widget it provides scales, sliders, dials, compasses, thermometers, wheels and knobs to control or display values, arrays, or ranges of type double.
Download the Qwt Source Archive
Download the Qwt sources and extract the archive to your Qt build area.
Note: Make sure you configure, compile and install the qwt libraries in the same shell as the Qt installation as some Qt environment variables are reused for this build.
Configure the Build using qmake
Projects are described by the contents of project files (.pro). Files that end with the suffix .pri are included by the project files and contain definitions that are common for several project files. The information within these is used by qmake to generate a Makefile containing all the commands that are needed to build each project. Download the config file from below and replace the existing one.
Build and Install
Run make to build the cross-compiled target version of Qwt.
Once the build has completed it is time to install Qwt. You may need to su to root to do this part depending upon what prefix you configured the build with.
All files provided by Xilinx may be used under the terms of the GNU Lesser General Public License (LGPL) version 2.1. Please refer to the Qt5 Licensing page and Qwt License for details.