C

Getting Started with the Evaluation Package

Overview

This topic provides instructions to compile and run the following example applications offered with the Qt Quick Ultralite evaluation package:

The Thermostat applicationDemonstrates a pure QML-based application
Automotive Cluster exampleDemonstrates integrating QML and C++, and also using 3rd party libraries.
Chess exampleDemonstrates the Qt Quick Ultralite C++ API usage

If you prefer to use Qt creator, see Integrating Qt Quick Ultralite with Qt Creator.

All samples in this document assume using MSVC environment when cross-compiling. If preferred, ninja or jom could be used when cross-compiling. MSVC is required only when building for Desktop.

Desktop environment

Prerequisites

To build an application with MSVC, your environment must have the following tools installed:

  • MSVC compiler v19.16 - provided with Visual Studio 2017 15.9.9 or later
  • Qt 5.14 or later. Add <Qt version>\msvc2017_64\bin to the PATH environment variable.
  • CMake 3.13 or later added to the PATH environment variable.
  • Clang v9.0.0 or later added to the PATH environment variable.

Building

Make sure that CMake, Qt, and MSVC are in your PATH environment variable.

Extract the Qt Quick Ultralite evaluation package.

You can run cmake and build the example application as follows:

  1. Thermostat example
    set Qul_DIR=< QUL_INSTALL_PATH >
    cd %Qul_DIR%\examples\thermo
    mkdir build_desktop
    cd build_desktop
    cmake .. -DQUL_PLATFORM=Qt -DQUL_COLOR_DEPTH=32 -A x64
    cmake --build .

    You can find the two executables, thermo_big.exe and thermo_small.exe, in the <BUILD_DIR>\Debug directory.

  2. Automotive Cluster example
    set Qul_DIR=< QUL_INSTALL_PATH >
    cd %Qul_DIR%\examples\automotive
    mkdir build_desktop
    cd build_desktop
    cmake .. -DQUL_PLATFORM=Qt -DQUL_COLOR_DEPTH=32 -A x64
    cmake --build .

    You can find the executable in the <BUILD_DIR>\Debug directory.

  3. Chess example
    set Qul_DIR=< QUL_INSTALL_PATH >
    cd %Qul_DIR%\examples\chess
    mkdir build_desktop
    cd build_desktop
    cmake .. -DQUL_PLATFORM=Qt -DQUL_COLOR_DEPTH=32 -A x64
    cmake --build .

    You can find the executable in the <BUILD_DIR>\Debug directory.

Note: The Qul_DIR environment must point to the Qt Quick Ultralite installation path, so that cmake can locate the necessary packages.

The following CMake build options can be used while building::

-DCMAKE_PREFIX_PATHThe path to the extracted evaluation package
-DQUL_PLATFORM=QtThe Qt Quick Ultralite platform to use. For desktop build, Qt is used
-DQUL_COLOR_DEPTH=32The color depth for the rendering. The evaluation package only contains the library for 32bit for the Qt platform
-A x64Specify the architecture. The evaluation package only contains the 64 bit version

NXP 1050 environment

Prerequisites

You must have the ARM toolchain (version 8-2019-q3-update). You can download the compressed toolchain version for Windows from ARM toolchain. Extract it into your environment.

Note: The extraction path must not contain spaces.

To be able to run and debug in general, get the J-Link Software and Documentation Pack from J-Link / J-Trace Downloads Add the location of the extracted JLink.exe to your PATH environment variable.

In order to use the J-Link tools with the i.MX RT1050 Evaluation Kit board the firmware on the device needs to be updated. You need to do this only once. Update the firmware as follows:

  1. Download new firmware. See OpenSDA_MIMXRT1050-EVK-Hyperflash
  2. Hold the reset button that is next to the USB power connector.

  3. While still holding the reset button, connect the USB cable from your host machine to the device.
  4. Release the reset button.
  5. An additional drive appears in your host's file explorer. Drop the downloaded file 49_OpenSDA_MIMXRT1050-EVK-Hyperflash.bin there.
  6. Wait as long as the drive is disconnected from the system. In the file explorer, you see that the drive is disconnected.
  7. Reboot the device.
  8. You find the new device under Ports (Com & LPT). For example, its name is JLink CDC UART PORT(COM6).

Also, install CMake 3.13 or later and add it to your PATH environment variable.

Building

Extract the Qt Quick Ultralite evaluation package and create a new build directory under the examples\themo subdirectory.

You can run cmake and build the example application as follows:

Note: In order to use the NMake Makefiles CMake generator you need to run the cmake using Native Tools Command Prompt for VS 2017 provided with Visual Studio 2017 15.9.9 or later. Alternatively you can use ninja or jom if those tools are added to your PATH environment variable.

Note: In order to flash application binaries as described below, the JLink.exe tool must be in your PATH environment variable when you run cmake

  1. Thermostat example
    set ARMGCC_DIR=< gcc-arm-none-eabi-8-2019-q3-update-win32 extraction path >
    set Qul_DIR=< QUL_INSTALL_PATH >
    cd %Qul_DIR%\examples\thermo
    mkdir build_nxp
    cd build_nxp
    cmake .. -DCMAKE_TOOLCHAIN_FILE=%Qul_DIR%/CMake/evkbimxrt1050-toolchain.cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel
    cmake --build .
    
    Flash your device as follows:
    
    \badcode
    nmake flash_thermo_small
  2. Automotive Cluster example

    Note: The Autmotive Cluster example is designed for a screen with minimun resolution of 800 x 480, so it cannot be run on the i.MX RT1050 evaluation kit board.

  3. Chess example
    set ARMGCC_DIR=< gcc-arm-none-eabi-8-2019-q3-update-win32 extraction path >
    set Qul_DIR=< QUL_INSTALL_PATH >
    cd %Qul_DIR%\examples\chess
    mkdir build_nxp
    cd build_nxp
    cmake .. -DCMAKE_TOOLCHAIN_FILE=%Qul_DIR%/CMake/evkbimxrt1050-toolchain.cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel
    cmake --build .

    Flash your device as follows:

    nmake flash_chess

    .

The following environment variables could be used while building:

Qul_DIRQt Quick Ultralite evaluation package installation path, also used by cmake to locate the Qt Quick Ultralite package.
ARMGCC_DIRARM toolchain installation path.

The following CMake build options can be used while building::

-DCMAKE_TOOLCHAIN_FILEThe toolchain file for the NXP board, which can be found in the evaluation package.
-G "NMake Makefiles"The CMake generator. Ninja, NMake Makefiles JOM also work, and require those tools to be available within your PATH environment variable.
-DCMAKE_BUILD_TYPE=MinSizeRelThe CMake build type. Can also be Debug or Release
-DQUL_TARGET_STORAGE=SdRamUse this option if you want to build binaries that are run from sdram, by default the binaries are linked to be run from persistent flash.

STM32F7 environment

Prerequisites

You must have the ARM toolchain (version 8-2019-q3-update). You can download the compressed toolchain version for Windows from ARM toolchain. Extract it into your environment.

Note: The extraction path must not contain spaces.

For flashing, you need STM32CubeProgrammer. Install STM32CubeProgrammer under its default location or add its bin directory to your PATH environment variable.

Also, install CMake 3.13 or later and add it to your PATH environment variable.

Building

Extract the Qt Quick Ultralite evaluation package.

You can run cmake and build the applications as follows:

Note: In order to use the NMake Makefiles CMake generator you need to run the cmake using Native Tools Command Prompt for VS 2017 provided with Visual Studio 2017 15.9.9 or later. Alternatively you can use ninja or jom if those tools are added to your PATH environment variable.

Note: In order to flash application binaries as described below, the STM32CubeProgrammer tool must be in your PATH environment variable when you run cmake

  • 32F769IDISCOVERY
    1. Thermostat example
      set ARMGCC_DIR=< gcc-arm-none-eabi-8-2019-q3-update-win32 extraction path >
      set Qul_DIR=< QUL_INSTALL_PATH >
      cd %Qul_DIR%\examples\thermo
      mkdir build_stm32f769i
      cd build_stm32f769i
      cmake .. -DCMAKE_TOOLCHAIN_FILE=%Qul_DIR%/CMake/stm32f769i-discovery.cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel
      cmake --build .

      Flash your device as follows:

      nmake flash_thermo_big
    2. Automotive Cluster example

      Note: The Automotive Cluster example is designed to utilize hardware acceleration features offered by Renesas RH850 MCU, so the perfomance on 32F769IDISCOVERY board might be lower than 30 FPS with some of transitions.

      set ARMGCC_DIR=< gcc-arm-none-eabi-8-2019-q3-update-win32 extraction path >
      set Qul_DIR=< QUL_INSTALL_PATH >
      cd %Qul_DIR%\examples\automotive
      mkdir build_stm32f769i
      cd build_stm32f769i
      cmake .. -DCMAKE_TOOLCHAIN_FILE=%Qul_DIR%/CMake/stm32f769i-discovery.cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel
      cmake --build .

      Flash your device as follows:

      nmake flash_automotive
    3. Chess example
      set ARMGCC_DIR=< gcc-arm-none-eabi-8-2019-q3-update-win32 extraction path >
      set Qul_DIR=< QUL_INSTALL_PATH >
      cd %Qul_DIR%\examples\chess
      mkdir build_stm32f769i
      cd build_stm32f769i
      cmake .. -DCMAKE_TOOLCHAIN_FILE=%Qul_DIR%/CMake/stm32f769i-discovery.cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=MinSizeRel
      cmake --build .

      Flash your device as follows:

      nmake flash_chess
  • STM32F7508-DK
    1. Thermostat example
      set ARMGCC_DIR=< gcc-arm-none-eabi-8-2019-q3-update-win32 extraction path >
      set Qul_DIR=< QUL_INSTALL_PATH >
      cd %Qul_DIR%\examples\thermo
      mkdir build_stm32f7508
      cd build_stm32f7508
      cmake .. -DCMAKE_TOOLCHAIN_FILE=%Qul_DIR%/CMake/stm32f7508-discovery.cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
      cmake --build .

      Flash your device as follows:

      • If done for the first time (this step can be skipped if already done for other example)
        nmake flash_thermo_small_and_bootloader
      • On subsequent builds
        nmake flash_thermo_small
    2. Automotive Cluster example

      Note: The Autmotive Cluster example is designed for a screen with minimun resolution of 800 x 480, so it cannot be run on STM32F7508-DK board.

    3. Chess example
      set ARMGCC_DIR=< gcc-arm-none-eabi-8-2019-q3-update-win32 extraction path >
      set Qul_DIR=< QUL_INSTALL_PATH >
      cd %Qul_DIR%\examples\chess
      mkdir build_stm32f7508
      cd build_stm32f7508
      cmake .. -DCMAKE_TOOLCHAIN_FILE=%Qul_DIR%/CMake/stm32f7508-discovery.cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release
      cmake --build .

      Flash your device as follows:

      • If done for the first time (this step can be skipped if already done for other example)
        nmake flash_chess_and_bootloader
      • On subsequent builds
        nmake flash_chess

The following environment variables could be used while building:

Qul_DIRQt Quick Ultralite evaluation package installation path, also used by cmake to locate the Qt Quick Ultralite package.
ARMGCC_DIRARM toolchain installation path.

The following CMake build options can be used while building::

-DCMAKE_TOOLCHAIN_FILEThe toolchain file for the STM32F7 board. Currently can be set to:
  • %Qul_DIR%/CMake/stm32f769i-discovery.cmake for STM32F769IDISCOVERY Discovery Kit
  • %Qul_DIR%/CMake/stm32f7508-discovery.cmake for STM32F7508-DK Discovery Kit
-G "NMake Makefiles"The CMake generator. Ninja, NMake Makefiles JOM also work, and require those tools to be available within your PATH environment variable.
-DCMAKE_BUILD_TYPE=MinSizeRelThe CMake build type. Can also be Debug or Release

Available under certain Qt licenses.
Find out more.