How To Use Qt Creator with a Timesys Cross-Toolchain

The following document describes the method for using a Timesys Factory-built cross-toolchain with Qt Creator. This will allow you to build applications for your target hardware directly from Qt Creator.

Prerequisites

  • Linux host system with the following installed:
    • Timesys SDK with Qt for target platform
    • Qt Creator
      • Click the version of Qt you are targeting, then click the Qt Creator breadcrumb for download links.

Setup

  1. Open Qt Creator.
  2. Select Tools -> Options... from the menu bar.
  3. In the Options dialog, select Build & Run on the left pane.
  4. Click the Compilers tab. Set up the following:
    • Click the Add button on the right, and select GCC.
    • Provide a Name for the compiler. This may be any arbitrary name, such as Timesys Cross Toolchain.
    • For the Compiler Path, provide the full path of the GCC cross-compiler built by Factory. (e.g. /home/user/timesys/vybrid/toolchain/bin/armv7l-timesys-linux-gnueabi-gcc). The other options may be left as their defaults.
  5. Click the Qt Versions tab.
    • Click the Add button on the right.
    • Select the qmake executable in your Timesys cross-toolchain (e.g. /home/user/timesys/vybrid/toolchain/bin/qmake).
  6. Click the Kits tab.
    • Click the Add button on the right to create a new kit.
    • Specify a name for your kit.
    • Choose the Compiler and Qt Version previously specified. All other options may be left as their defaults.
  7. Exit the Options dialog, saving your changes.

Using the toolchain with a new project

  1. Create a new project in Qt Creator by choosing File > New File or Project....
  2. Select the application type, and press the Choose... button.
  3. Select a name and location for the Qt application and press Next.
  4. Select the Kit previously defined, and press Next until finished. The new project is now created.
  5. Develop your application.
  6. Build the application.
    • Right click on the project name and chose Run qmake.
    • Right click on the project name and click Build.
  7. Copy the resulting binary to your target's RFS and boot the target.
  8. Run the application from the target terminal.
    • For Qt4, run ./appname -qws
    • For Qt5 (with eglfs), run ./appname --platform eglfs on the target terminal to run the Qt application.