On this page

C

CMake manual for Nuvoton 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 Nuvoton 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/3.0.0
export QUL_TOOLS=$HOME/Qt/Tools/QtMCUs
set QUL_ROOT=C:\Qt\QtMCUs\3.0.0
set QUL_TOOLS=C:\Qt\Tools\QtMCUs

Build configuration

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

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_PLATFORMSet gerda-4l-uitron or gerda-4ul-utkernel as the target platform.
-DQUL_PLATFORM=gerda-4l-uitron
CMAKE_TOOLCHAIN_FILEThe gerda-4l-uitron and gerda-4ul-utkernel platform supports the IAR toolchains:
-DCMAKE_TOOLCHAIN_FILE=%QUL_ROOT%\lib\cmake\Qul\toolchain\iar.cmake
QUL_TARGET_TOOLCHAIN_DIRSet the toolchain directory path to help find the compiler. For example:
-DQUL_TARGET_TOOLCHAIN_DIR="C:\Program Files (x86)\IAR Systems\Embedded Workbench 9.2\arm"
QUL_BOARD_SDK_DIRSet the SDK installation path. For example:
-DQUL_BOARD_SDK_DIR=C:\path\to\Gerda-4L
QUL_COLOR_DEPTHUse QUL_COLOR_DEPTH to set the color depth supported by the platform. The reference port for Gerda-4L and Gerda-4UL supports 32bpp color depth.
-DQUL_COLOR_DEPTH=32

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

GERDA_ENABLE_TOUCH_SCREENSet the GERDA_ENABLE_TOUCH_SCREEN variable to ON to enable touch input on Gerda-4UL board. This variable is set to OFF by default. See Enabling touch input on Gerda-4UL.
-DGERDA_ENABLE_TOUCH_SCREEN=ON

Note: This variable is only applicable for Gerda-4UL which supports touch input.

PARTNER_JET2_PATHTo use PARTNER-Jet2 as the flashing device, set the PARTNER-Jet2 flashing software path. For example:
-DPARTNER_JET2_PATH="C:\path\to\partner-jet-installation"

Note: This variable is only needed if PARTNER-Jet2 is to be used for flashing.

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.