C

CMake manual for Infineon boards

The CMake build tool simplifies the build process for development projects. It automatically generates build systems, such as Makefiles and Visual Studio project files.

CMake is a third-party tool with its own documentation. This topic describes how to use CMake with Qt Quick Ultralite when developing applications for Infineon boards.

QUL_ROOT and QUL_TOOLS are used in the command line examples below as if they were set as environment variables. For example:

export QUL_ROOT=$HOME/Qt/QtMCUs/2.8.1
export QUL_TOOLS=$HOME/Qt/Tools/QtMCUs
set QUL_ROOT=C:\Qt\QtMCUs\2.8.1
set QUL_TOOLS=C:\Qt\Tools\QtMCUs

Build configuration

Configure the following CMake variables when developing applications for Infineon boards.

Warning: The incremental build with Green Hills MULTI Compiler fails when the Ninja generator is used. CMake warns you about this on using the Ninja generator. It is recommended to use the NMake Makefiles or NMake Makefiles JOM generator instead.

VariableValue
Qul_ROOTSet the Qul_ROOT to the Qt for MCUs SDK install path.
-DQul_ROOT=%QUL_ROOT%

Note: This CMake variable is intentionally mixed-case since it needs to match the package name.

QUL_PLATFORMThe platform to build must be set to tviic2d4m-baremetal, tviic2d4mlite-baremetal, tviic2d6m-baremetal or tviic2d6mddr-baremetal depending on the target board.
-DQUL_PLATFORM=tviic2d4m-baremetal
CMAKE_TOOLCHAIN_FILEThis platform supports the GHS for ARM and IAR toolchains.
-DCMAKE_TOOLCHAIN_FILE=%QUL_ROOT%\lib\cmake\Qul\toolchain\ghs-arm.cmake

Or

-DCMAKE_TOOLCHAIN_FILE=%QUL_ROOT%\lib\cmake\Qul\toolchain\iar.cmake
QUL_TARGET_TOOLCHAIN_DIRQUL_TARGET_TOOLCHAIN_DIR CMake cache entry needs to be used to provide the location of the compiler. For example:
-DQUL_TARGET_TOOLCHAIN_DIR=C:\ghs\comp_201714

or

-DQUL_TARGET_TOOLCHAIN_DIR="C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0 EWARM FS 8.22.3\arm"
QUL_BOARD_SDK_DIRSet the QUL_BOARD_SDK_DIR CMake cache entry to the Graphics Driver for TRAVEO™ T2G Cluster Series installation path. For example:
-DQUL_BOARD_SDK_DIR=C:\TVII-GraphicsDriver
QUL_COLOR_DEPTHThe supported color depth by this platform is 32-bit.

Note: If this variable is not set, default color depth is used while configuring for the platform.

-DQUL_COLOR_DEPTH=32
INFINEON_AUTO_FLASH_UTILITY_DIRSet the INFINEON_AUTO_FLASH_UTILITY_DIR CMake cache entry to the Infineon Auto Flash Utility installation path. For example:
-DINFINEON_AUTO_FLASH_UTILITY_DIR="C:\Program Files (x86)\Infineon\Auto Flash Utility 1.4"

Note: In a Qt Quick Ultralite project, CMAKE_BUILD_TYPE is set to MinSizeRel by default. MinSizeRel is the build type used for the prebuilt platform libraries shipped with Qt Quick Ultralite. To change the build type (to Release for example), invoke CMake with the -DCMAKE_BUILD_TYPE=Release option. For more information, see CMAKE_BUILD_TYPE.

Available under certain Qt licenses.
Find out more.