Qt for VxWorks
Contact The Qt Company for more information: https://www.qt.io/contact-us/
Qt for VxWorks Licensing
Qt for VxWorks is available under the Qt for Device Creation Professional (DCP) license. For more information, see Qt Pricing.
Supported Architectures and VxWorks Releases
- Qt 6.7 is verified on VxWorks 24.03 Supported architecture is ARM-v7.
If you are interested in later Qt releases, please contact Qt professional services.
Requirements for VxWorks
Qt Widgets Applications
- POSIX support
- C++17 support
Qt Quick 2 Applications
All features which are required for Qt Widgets applications, and in addition the following:
- GPU device (GPUDEV) for OpenGL ES 2.0
Supported Modules
Most essential Qt modules and some add-on modules are supported.
Supported Essential modules
Qt Module | Supported Features | Notes |
---|---|---|
Qt Core | No support for QProcess. QLocalSocket and QLocalServer support only SOCK_SEQPACKET. | |
Qt GUI | ||
Qt Network | ||
Qt Qml | ||
Qt Quick | ||
Qt Quick Controls | ||
Qt Quick Dialogs | ||
Qt Quick Layouts | ||
Qt Quick Test | ||
Qt Test | ||
Qt Widgets |
Supported Add-Ons
Qt Add-Ons | Notes |
---|---|
Qt Concurrent | |
Qt GRPC/Protobuf | |
Qt Graphs | |
Qt Image Formats | |
Qt Multimedia | |
Qt Native Interfaces | |
Qt OpenGL | |
Qt Quick 3D | |
Qt Quick Compiler | |
Qt Quick Effects | |
Qt SQL | |
Qt SVG | |
Qt Virtual Keyboard |
Note: You can explicitly exclude unsupported or unused modules from the build via the -skip <module> option when running the configure tool.
Platform Notes
With the release of Qt 5.0, Qt no longer contains its own window system implementation: QWS is no longer a supported platform. For single-process use cases, the Qt Platform Abstraction is a superior solution.
There is one plugin that is usable on VxWorks: EGLFS. The availability of this plugins depends on the configuration of Qt.
Configuring for a Specific Device
Prepare your environment by installing VxWorks SDK and obtaining WindRiver license which is needed by installer and for building VxWorks images. Search for appropriate installer in {https://gallery.windriver.com/portal/products}.
Building Qt for a given device requires a Qt6 installation for compilation host, a toolchain and a sysroot. Additionally, some devices require vendor specific adaptation code for EGL and OpenGL 2.0 support.
VxWorks image requirements
Qt for VxWorks requires certain VxWorks image bundles and components to be embedded in base software to make Qt compile and work properly. The list is by no means complete as it depends on hardware, software and system requirements of your project. However, the following table contains those that are mandatory for certain functionalities to work. Note also that these might change with VxWorks versions.
Example VSB configuration for i.MX 6 BSP
You need to add the following features to VSB for Qt to work properly. For more details please check WindRiver VxWorks Documentation.
Feature | Notes |
---|---|
DSI_DSI_KERNEL | |
IPNET_COREIP | |
IPNET_DHCPC | |
SDMMC_DEVICE | |
SDMMC_HOST | |
SDMMC_SDHC | |
SDMMC_STORAGE | |
SERVICE_UN | |
SOCKET | |
USB_EHCI | |
USB_KEYBOARD | |
USB_MOUSE | |
USB_STORAGE | |
EVDEV | |
EVDEV_LIB | |
EVDEV_TI_TSC2004_TS | |
EVDEV_EETI_EXC7200_TS | |
AUDIO | |
GPUDEV_FSLVIVGPU | |
HASH | |
OPENSSL | |
RANDOM_ENTROPY_INJECT | |
IPNET_SSH | |
USER_MANAGEMENT | |
ICU |
The following config variables are added implicitly and you need to remove them:
Variable | Notes |
---|---|
_WRS_CONFIG_EVDEV_OPTIMIZED_MODE | |
_WRS_CONFIG_EVDEV_DISPLAY_POINT_TRANSLATE |
You need to add the following variables to the config:
Variable | Value | Notes |
---|---|---|
_WRS_CONFIG_RTP_SSP | y | |
_WRS_CONFIG_RTP_STACK_PROTECTOR | y |
Example VIP configuration for i.MX 6 BSP
For more details please check WindRiver VxWorks Documentation.
Layer | Notes |
---|---|
BUNDLE_POSIX | This bundle is necessary for compatibility with POSIX-related functionalities which Qt requires. |
INCLUDE_TMP_DIR INCLUDE_RAM_DISK_FORMAT_HRFS | Including these two components is necessary if you want to use QTemporaryFile. Note that you should also consider setting TMP_DIR_SIZE to appropriate value |
BUNDLE_RTP_DEVELOP | |
BUNDLE_RTP_DEPLOY | |
BUNDLE_STANDALONE_SHELL | |
DRV_AUDIO_FSL_SSI | |
DRV_AUDIO_FSL_SGTL5000 | |
DRV_FSL_SDHC_CTRL | |
DRV_IMX_SDHC_CTRL | |
INCLUDE_EHCI_INIT | |
INCLUDE_FSL_IMX6Q_SABRELITE | |
DRV_MMCSTORAGE_CARD | |
DRV_SDSTORAGE_CARD | |
INCLUDE_AUDIO_LIB_CORE | |
INCLUDE_AUDIO_LIB_WAV | |
INCLUDE_CUSTOM_ENTROPY_ADD | |
INCLUDE_DEBUG_AGENT_START | |
INCLUDE_DEFAULT_TIMEZONE | |
INCLUDE_DISK_UTIL | |
INCLUDE_DOSFS | |
INCLUDE_DSAPARAM_CMD | |
INCLUDE_END | |
INCLUDE_EVDEV_LIB_CORE | |
INCLUDE_EVDEV_LIB_KBD | |
INCLUDE_EVDEV_LIB_KBD_MAP_US | |
INCLUDE_EVDEV_LIB_PTR | |
INCLUDE_GENDSA_CMD | |
INCLUDE_GENRSA_CMD | |
INCLUDE_GETADDRINFO | |
INCLUDE_GETNAMEINFO | |
INCLUDE_HRFS | |
INCLUDE_HRFS_ACCESS_TIMESTAMP | |
INCLUDE_HRFS_FORMAT | |
INCLUDE_HRFS_HISPEED_WRITE_MODE | |
INCLUDE_IFCONFIG | |
INCLUDE_IO_REALPATH | This component is needed to enable the use of the realpath function needed for QFileInfo |
INCLUDE_IPATTACH | |
INCLUDE_IPCOM_SYSLOGD_CMD | |
INCLUDE_IPCOM_SYSVAR_CMD | |
INCLUDE_IPCOM_USE_RAM_DISK | |
INCLUDE_IPCOM_USE_TIME_CMD | |
INCLUDE_IPDHCPC | |
INCLUDE_IPDNSC | |
INCLUDE_IPD_CMD | |
INCLUDE_IPFTPC | |
INCLUDE_IPFTP_CMD | |
INCLUDE_IPIFCONFIG_CMD | |
INCLUDE_IPNETSTAT_CMD | |
INCLUDE_IPNSLOOKUP_CMD | |
INCLUDE_IPPING_CMD | |
INCLUDE_IPROUTE_CMD | |
INCLUDE_IPTRACE_ROUTE_CMD | |
INCLUDE_IPWRAP_GETHOSTBYADDR | |
INCLUDE_IPWRAP_GETHOSTBYNAME | |
INCLUDE_IPWRAP_GETNAMEINFO | |
INCLUDE_IPWRAP_IFNAME | |
INCLUDE_IPWRAP_ROUTECMD | |
INCLUDE_MMAP | |
INCLUDE_PING | |
INCLUDE_PIPES | |
INCLUDE_POSIX_MAPPED_FILES | |
INCLUDE_POSIX_PIPES | |
INCLUDE_POSIX_PTHREAD_SCHEDULER | |
INCLUDE_POSIX_SHM | |
INCLUDE_RAM_DISK | |
INCLUDE_RAM_DISK_FORMAT_HRFS | |
INCLUDE_RANDOM_NUM_GEN | |
INCLUDE_ROMFS | |
INCLUDE_ROUTECMD | |
INCLUDE_SC_PIPE | |
INCLUDE_SC_POSIX_PIPE | |
INCLUDE_SD_BUS | |
INCLUDE_SECURITY | |
INCLUDE_SEC_KEY_STORE_CMD | |
INCLUDE_SHELL | |
INCLUDE_SSH | |
INCLUDE_STANDALONE_SYM_TBL | |
INCLUDE_STARTUP_SCRIPT | |
INCLUDE_TMP_DIR | |
INCLUDE_UN_COMP | |
INCLUDE_USB_GEN2_KEYBOARD | |
INCLUDE_USB_GEN2_MOUSE | |
INCLUDE_USB_GEN2_STORAGE_INIT | |
INCLUDE_USER_DATABASE | |
INCLUDE_USER_IDENTIFICATION | |
INCLUDE_VRFS | |
INCLUDE_VXBUS_SHOW | |
DRV_TOUCH_SCREEN_TI_TSC2004 | |
DRV_TOUCH_SCREEN_EETI_EXC7200 | |
INCLUDE_FBDEV_FSLIPU_0 | |
INCLUDE_FBDEV_SPLASH | |
INCLUDE_GPUDEV_FSLVIV_API | |
INCLUDE_GPUDEV_FSLVIV_API_INIT |
The following components are added implicitly and you need to remove them:
Layer | Notes |
---|---|
INCLUDE_FTP | |
INCLUDE_SHELL_SECURITY |
VIP Parameters
You need to add the following parameters for Qt to run properly on VxWorks:
Parameter | Example value | Notes |
---|---|---|
SEC_VAULT_KEY_ENCRYPTING_PW | '"vxTarget"' | Example value |
UDB_STORAGE_PATH | '"/ram/vxUserDB.txt"' | Example value |
UDB_HASH_KEY | '"123456789"' | Example value |
UDB_HASH_KEY_LEN | 9 | Example value, see previous |
FSLVIV_RTP_COMMAND_BUFFER_QUEUE | 32 | For 'arm' architecture |
SYS_CLK_RATE | 100 | |
RTP_PTHREAD_STACK_SIZE_DEFAULT | 131072 | |
TMP_DIR_SIZE | 614400 | Minimum value for passing Qt internal tests |
NUM_FILES | 300 | |
RTP_FD_NUM_MAX | 300 | |
HRFS_DEFAULT_MAX_FILES | 300 |
Building Qt6 for VxWorks
Building Qt6 for host
When cross-building Qt6 for VxWorks, it's best practice to use host tools that use the same source code as cross-build does. This requires building Qt6 for host first, but only with limited subset of submodules:
- qtbase
- qtdeclarative
- qtquick3d
- qtshadertools
Make sure to have all necessary prerequisites for building Qt6 for host. Check details in Building Qt Sources.
The commands to configure, build, and install Qt6 for host are the following:
./configure \ -cmake-generator "Ninja" \ -extprefix <path_to_qt6_host_installation_dir> \ -submodules qtbase,qtdeclarative,qtquick3d,qtshadertools \ -nomake tests \ -nomake examples \ -- \ -B <host_build_directory> cd <host_build_directory> ninja ninja install
After these commands, Qt6 for host is installed in <path_to_qt6_host_installation_dir>
.
Building Qt6 for target
Before running configure and building Qt 6 it is required to open VxWorks Development Shell in command prompt.
- Linux:
cd <VxWorks installation directory> ./wrenv.sh -p vxworks
- Windows:
cd <VxWorks installation directory> wrenv -p vxworks
Below is an example build configuration for the BD-SL-i.MX6. For most VxWorks boards the configure command looks very similar. By default, Qt 6 is configured to use shared libraries. To build Qt 6 statically, add -static
option for configure.
Make sure that {WIND_CC_SYSROOT} environment variable is set to VxWorks VSB root directory.
./configure \ -cmake-generator "Ninja" \ -icu \ -no-feature-vulkan \ -platform vxworks-clang \ -qt-host-path <path_to_qt6_host_installation_dir> \ -submodules "qtbase,qtdeclarative,qtmultimedia,qtquick3d,qtgraphs,qtimageformats,qtsvg,qtshadertools,qtvirtualkeyboard" \ -sysroot <path_to_vxworks_vsb_dir>/fsl_imx6_<vsb_version>_VSB \ -qpa "eglfs" \ -DQT_QPA_EGLFS_INTEGRATION=eglfs_viv \ -prefix /sd0:1/qt6rtp \ -extprefix <path_to_host_dir>/qt6rtp \ -nomake tools \ -nomake examples \ -- \ -B <target_build_dir> \ -DCMAKE_TOOLCHAIN_FILE="$WIND_CC_SYSROOT/mk/rtp.toolchain.cmake"
In case of building for DKM rather than RTP, use -static
option and change the CMAKE_TOOLCHAIN_FILE
value to "$WIND_CC_SYSROOT/mk/dkm.toolchain.cmake"
It is recommended to build Qt 6 using a shadow build. See Qt Configure Options for more information.
When configuration is successful, building and installing Qt6 for VxWorks takes place as follows:
cd <target_build_dir> ninja ninja install
Platform Plugins for VxWorks Devices
Qt for VxWorks supports EGLFS platform plugin for a native window substitution. Read more about its configuration in EGLFS.
Running Qt Applications
The following example shows how to start an application when Qt 6 is built using shared libraries. With a statically built Qt 6, you don't need to use the LD_LIBRARY_PATH
environment variable for the Qt libraries, but it needs to point to the location of VxWorks shared libraries (for example libc and OpenGL ES 2.0). It is not needed for Qt 6 static libraries.
putenv "LD_LIBRARY_PATH=/sd0:1/lib" cd "/sd0:1" rtpSp("<Qt6_app>", 200, 0x100000, 0, 0x01000000)
Limitations
Video Memory
Systems with a fixed amount of dedicated video memory may need extra care before running Qt application based on Qt Quick or classes like QOpenGLWidget. The default setting might be insufficient for such applications, especially when they are displayed on a high resolution (for example, full HD) screen. In this case they might start failing in unexpected ways. It is therefore recommended to ensure that there is at least 128 MB of GPU memory available. For systems that do not have a fixed amount of memory reserved for the GPU this is not an issue.