This page contains information about the Qt Commercial port for VxWorks. More information about the combinations of platforms and compilers supported by Qt Commercial can be found on the Supported Platforms page.
Qt Commercial has been tested on Wind River VxWorks 6.9.2 in both DKM and RTP mode using the vendor supplied GCC or DIAB compiler, targeting the x86 simulator, IA and ARM/ARM-v7 devices.
Qt Commercial edition of Qt for VxWorks, the first step is to install your license file.
For linux: Copy file to $HOME/.qt-license
For Windows: Copy file to C:\Documents and Settings\<Username>\.qt-license
Qt for VxWorks needs to be cross-compiled on a host machine. Building the Qt for VxWorks simulator (VxSim) would be done like this:
Before configuring Qt:
Before building the Qt for VxWorks library, run the configure.exe to configure the library for your development architecture. You can list all of the configuration system's options by typing
configure -help
The Configuration Options for Qt page gives a brief overview of these.
configure -static -release -embedded -platform win32-g++ -xplatform qws/vxworks-simdkm-g++ -make make -hostprefix %CD% -prefix /tmp/qtsimdkm -qt-sql-sqlite -no-script -nomake examples -nomake demos
configure -release -embedded -platform win32-g++ -xplatform qws/vxworks-simrtp-g++ -make make -hostprefix %CD% -prefix /tmp/qtsimrtp -no-webkit -nomake examples -nomake demos
Note: QtWebkit is not currently supported when cross compiling Qt on Windows host.
set WIND_WORKSPACE_PATH=<WindRiver workspace> make
Copy directories from Qt build directory to directory given by -prefix option when configured Qt. e.g. C:\tmp\qtsimdkm
For DKM: Copy lib and demos directories:
xcopy C:\<path to Qt builddir>\lib C:\tmp\qtsimdkm\lib /e /i xcopy C:\<path to Qt builddir>\demos C:\tmp\qtsimdkm\lib /e /i
For RTP: Copy lib, demos, plugins and imports directories:
xcopy C:\<path to Qt builddir>\lib C:\tmp\qtsimrtp\lib /e /i xcopy C:\<path to Qt builddir>\demos C:\tmp\qtsimrtp\demos /e /i xcopy C:\<path to Qt builddir>\plugins C:\tmp\qtsimrtp\plugins /e /i xcopy C:\<path to Qt builddir>\imports C:\tmp\qtsimrtp\imports /e /i
Before building the Qt for VxWorks library, run the ./configure script to configure the library for your development architecture. You can list all of the configuration system's options by typing
./configure -embedded -help
The Configuration Options for Qt page gives a brief overview of these.
Configuring Qt:
./configure -static -xplatform qws/vxworks-simdkm-g++ -embedded vxworks -exceptions -no-gfx-linuxfb -no-mouse-linuxtp -no-mouse-pc -no-kbd-tty -qt-gfx-vxworksfb -qt-mouse-vxworks -qt-kbd-vxworks -qt-sql-sqlite -no-largefile -no-script
./configure -xplatform qws/vxworks-simrtp-g++ -embedded vxworks -exceptions -no-gfx-linuxfb -no-mouse-linuxtp -no-mouse-pc -no-kbd-tty -qt-gfx-vxworksfb -qt-mouse-vxworks -qt-kbd-vxworks -no-largefile -nomake examples
export WIND_WORKSPACE_PATH=<WindRiver workspace> make make install
By default QWS RTP Qt build has server/client support, e.g. ability to run multiple Qt application simultaneously. See QWS architecture for more info. This will add dependency to QtNetwork library for all Qt applications, and if this is not desired, it is possible disable the QWS server/client feature when configuring Qt. To disable this feature, simply add following to your configure line. After disabling feature, there is no need to pass the -qws argument for the Qt executable.
-DQT_NO_QWS_MULTIPROCESS
To configure Qt to use Qt Platform Abstraction (QPA) instead of QWS, replace the following configure option with QPA specific
FROM:
-xplatform qws/vxworks-simrtp-g++ -embedded vxworks
TO:
-xplatform qws/vxworks-simrtp-g++ -qpa -arch vxworks
The Qt installation can easily be optimized by avoiding to compile in the features that are not required. See more from Fine-Tuning Features in Qt.
To configure Qt for using minimal-vxworks, use following options:
-qpa -arch vxworks -xplatform qws/vxworks-simdkm-g++ -qconfig minimal-vxworks -D QT_QPA_VXWORKS -static -release -exceptions -no-freetype -qt-zlib -no-libpng -no-libtiff -no-libjpeg -no-libmng -no-largefile -no-openssl -no-mmx -no-3dnow -no-sse -no-sse2 -no-sse3 -no-ssse3 -no-sse4.1 -no-sse4.2 -no-avx -no-neon -qt-gfx-vxworksfb -qt-mouse-vxworks -no-gfx-linuxfb -no-gfx-multiscreen -no-mouse-pc -no-mouse-linuxtp -no-kbd-tty -no-xmlpatterns -no-script -no-webkit -no-qt3support -nomake examples -nomake docs -nomake translations-nomake demos
Qt provides several ready-made custom configuration files for VxWorks. These files are located in the <qt_install_dir>/src/corelib/global directory in the Qt source distribution.
If -prefix option was not given to when running configure script, by default Qt will be installed to /usr/local/Trolltech/QtEmbedded-4.8.7-vxworks-dkm or /usr/local/Trolltech/QtEmbedded-4.8.7-vxworks-rtp
There exist many cross-compile configurations for Qt for VxWorks for supporting multiple processor architectures. Available configurations can be found from directory <qt_install_dir>/mkspecs/qws with prefix vxworks- before architecture and VxWorks mode (DKM/RTP).
Following is example howto configure and build Qt for VxWorks for ARM7 hardware for RTP mode.
./configure -xplatform qws/vxworks-arm7rtp-g++ -embedded vxworks -exceptions -no-gfx-linuxfb -no-mouse-linuxtp -no-mouse-pc -no-kbd-tty \ -qt-gfx-vxworksfb -qt-mouse-vxworks -qt-kbd-vxworks -no-largefile -nomake examples -prefix /sd0:1/qtarm7rtp -hostprefix /tgtsvr/qtarm7rtp
export WIND_WORKSPACE_PATH=<WindRiver workspace> make make install
vxsim -f path/to/vxsimimage/vxWorks -size 800M
cd "path_to_qt_install_dir/demos/affine" ld < affine taskSpawn("main", 200, 0x01000000, 0x100000, main, 0,0,0,0,0,0,0)
putenv "QWS_DATA_HOME=/tmp" putenv "QWS_CACHE_HOME=/tmp/data/" cd "./demos/affine" rtpSp("affine -qws", 200, 0x100000, 0, 0x01000000)
Note: For Windows it is necessary to set LD_LIBRARY_PATH environment variable
putenv "LD_LIBRARY_PATH=/path_to_qt_install_dir/lib"
cd "./demos/affine" rtpSp("affine -platform vxworksfb", 200, 0x100000, 0, 0x01000000)
Note: For Windows it is necessary to set LD_LIBRARY_PATH and QT_QPA_PLATFORM_PLUGIN_PATH environment variables
putenv "QT_QPA_PLATFORM_PLUGIN_PATH=/path_to_qt_install_dir/plugins/platforms" putenv "LD_LIBRARY_PATH=/path_to_qt_install_dir/lib"
It is possible to run multiple Qt RTP applications simultaneously, then server Qt application will control access to the UI and input related hw interfaces e.g. display, mouse, keyboard. All client related painting to the hw screen are handled by the QWS server application. See QWS architecture for more info.
rtpSp("server -qws", 200, 0x100000, 0, 0x01000000)
rtpSp("client", 200, 0x100000, 0, 0x01000000)
int main(int argc, char **argv) { QApplication app(argc, argv); ... your code here ... return app.exec(); } static char *vxargv[6]; int vxmain(int argc, char *argv1, char *argv2, char *argv3, char *argv4, char *argv5, char *argv6) { vxargv[0] = argv1; vxargv[1] = argv2; vxargv[2] = argv3; vxargv[3] = argv4; vxargv[4] = argv5; vxargv[5] = argv6; return main(argc, vxargv); }
taskSpawn("vxmain", 200, 0x01000000, 0x100000, vxmain, 6, "yourappname", "argv2", "argv3", "argv4", "argv5", "argv6")
rtpSp("yourapp -arg1 -arg2 -arg3 -arg4 -arg5 -arg6", 200, 0x100000, 0, 0x01000000)
Qt supports a multiple font formats on VxWorks including: TrueType (TTF) and Qt pre-rendered fonts (QPF2). QPF2 fonts can be generated from TTF fonts by using the makeqpf tool. See more information about Qt embedded fonts.
By default QWS Qt applications share rendered glyphs for fonts between processes. It can be disabled by adding the following to the QWS server application environment before starting it.
putenv "QWS_NO_SHARE_FONTS=1"
It is possible to disable sharing rendered glyphs feature completely by adding following definition for configure script when compiling Qt.
-DQT_NO_QWS_SHARE_FONTS
Note: Sharing rendered glyphs generated from font files (TTF, QPF2) requires that the underlying filesystem used for storing font files must provide POSIX-conforming inode information (for example, HRFS). If fonts are not in the default Qt font directory <qt_install_dir>/lib/fonts, use following environment variable to contain the fonts directory:
putenv "QT_QWS_FONTDIR=/tmp"