Qt Creator for VxWorks

From Qt Wiki
Jump to navigation Jump to search

Steps to setup Qt Creator for VxWorks

Prepare Qt and VxWorks

  • Create VxWorks VSB and VIP to support used device and Qt
  • Configure and build Qt for VxWorks
    • Use prefix to point VxWorks Qt target folder. For example sd-card: /sd1:0/qt5
  • See options from http://doc.qt.io/qt-5/vxworks.html
  • After build, install modules to the host prefix
  • Copy host qt5 install folder to the target specified prefix folder
  • For shared version copy also all dependent dynamic system libraries from VSB.
  • Configure VxWorks device to be accessible on the local network

Enable Qt Creator VxWorks plugin

  • Qt Creator -> Help -> About Plugins -> VxWorks
  • Enable VxWorks plugin
  • Restart Creator after enabling the plugin

Set up VxWorks configuration to Qt Creator

  • Qt Creator -> Tools -> Options -> VxWorks
  • Add VxWorks installation folder
  • Add Mingw Bin folder (only on Windows)
    • Use Qt installer Tools\mingw492_32\bin
    • needs to be set up again after each Creator startup
    • needs to be set up before opening VxWorks Qt project

Set up VxWorks device connection

  • Qt Creator -> Tools -> Options -> Devices
  • Press ”Add...” select ”VxWorks device”
  • Name the device: VxWorks Device
  • Launch VxWorks on the device and check the target device IP address. Add IP address to the Target hostname.
  • Press ”Test TCF connection” to test the connection
  • Be aware that IP might be changed time to time if you’re using DHCP

Add VxWorks Qt version to Qt Creator

  • Qt Creator -> Tools -> Options -> Build & Run -> Qt Versions
  • Add compiled Qt for VxWorks to the qmake location and Apply
  • Name it for example: Qt 5.5.1 VxWorks

Add Creator Kit for VxWorks Qt version and the device

  • Qt Creator -> Tools -> Options -> Build & Run -> Kits
  • Device Type: VxWorks Device
  • Device: VxWorks Device
  • Compiler: VxWorks GCC 4.8.1.5 (arm)
  • Debugger: GNU gdb 7.8 for MinGW 4.9.2 32bit
  • Qt version: Qt 5.5.1 VxWorks

Build and run application

  • Create or open exists Qt application
  • Select Qt 5.5.1 VxWorks Kit for the application
  • Add needed environment variables:
    • Qt Creator -> Projects -> Qt 5.5.1 VxWorks Kit -> Run -> Run Environment
    • Most easiest is to paste ready made configuration to the batch edit
  • Just build & run.
  • Qt Creator uploads and starts application on the device.
    • There’s no progress bar to show uploading. So just wait and see the result from the VxWorks device.
    • It might take from few seconds to minutes to upload static application to the device
    • Creator doesn't show any errors of the uploading or running issues. See possible errors from the device terminal.

Troubleshooting & FAQ

”Libgcc_s_dw2-1.dll is missing” or ”Project ERROR: Failed to parse qmlimportscanner output.”

  • Close the project, add MinGW Bin folder to VxWorks configuration, re-open project

Application is not uploaded

  • Check connection cable, IP-adress and run ”Test TCF connection” from the Creator VxWorks device configuration.

Application is not started

  • Check that all needed libraries, plugins, qml files and other possible dependencies are located in the correct Qt target folder in the device. Usually some module or plugin may be missed from the Qt configuration.
  • If you have shared Qt. Check that LD_LIBRARYPATH is pointing to the target Qt lib folder. Check also that dependent system libraries are accessible.
  • Check from device terminal by VxWorks command "i" is the application started or not

Text is too small to read

  • Set QT_QPA_EGLFS_PHYSICAL_HEIGHT and QT_QPA_EGLFS_PHYSICAL_WIDTH to be aligned with the device screen physical size.

Application “has been deleted due to signal 6.” in the VxWorks

  • Set QT_QPA_EGLFS_FB point to correct FB
  • Make sure that environment variables are set to Run Settings and NOT to Build Settings

All settings looks to be ok on the Creator but application still won't start

  • Copy application manually to the device and run it from the VxWorks terminal to see more output errors. For example missing libraries are not detected when starting application from the Creator.

How to debug VxWorks application from the Qt Creator?

  • Not supported. To debug, you have to run application from the VxWorks terminal and use VxWorks debugging tools.

What Qt examples can be run from the Qt Creator?