Qt Creator for VxWorks

From Qt Wiki
Revision as of 08:02, 13 April 2016 by Markan (talk | contribs) (Created Qt Creator for VxWorks wiki page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Qt Creator for VxWorks

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 to be accessible on the local network

Enable Qt Creator VxWorks plugin

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

Set up VxWorks configuration to Qt Creator

  • Tools -> Options -> VxWorks
  • Add VxWorks installation folder
  • Add MingGW Bin folder
  • Use Qt installer Tools\mingw492_32\bin
  • Note: needs to be set up again after each Creator startup
  • Note: needs to be set up before opening VxWorks Qt project

Set up VxWorks device connection

  • 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

  • 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

  • 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:
    • 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 just uploads and starts application on the device. Unfortunately there’s no progress bar to show uploading. So just wait and see the result from the VxWorks device.
  • It might take from few sec to minutes to upload static application to the device
  • It doesn't show any errors. 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 VxWorks device.

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 by VxWorks terminal 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

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

  • Copy and launch application manually from the device to see more logs. For example missing libraries are not detected when starting application from the Creator.

How to debug VxWorks application from the Qt Creator?

  • Not supported.

What Qt examples can be run from the Qt Creator?