C

CMake manual for Renesas RH 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 Renesas RH 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.0
export QUL_TOOLS=$HOME/Qt/Tools/QtMCUs
set QUL_ROOT=C:\Qt\QtMCUs\2.8.0
set QUL_TOOLS=C:\Qt\Tools\QtMCUs

Build configuration

Setting up a development environment for RH850/D1M1A

Configure the following CMake variables when developing applications for RH850/D1M1A.

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

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

QUL_PLATFORMThe platform name must indicate the board and the OS you want to target. It's a combination of the chosen board's name and the OS you are targeting. The platform name in the following example indicates that your target is RH850/D1M1A on baremetal.
-DQUL_PLATFORM=rh850-d1m1a-baremetal

Note: If you want to target another board or OS, refer to Supported platforms for more information.

CMAKE_TOOLCHAIN_FILESet the CMAKE_TOOLCHAIN_FILE to the GHS toolchain.
-DCMAKE_TOOLCHAIN_FILE=$QUL_ROOT/lib/cmake/Qul/toolchain/ghs.cmake
-DCMAKE_TOOLCHAIN_FILE=%QUL_ROOT%\lib\cmake\Qul\toolchain\ghs.cmake
QUL_TARGET_TOOLCHAIN_DIRUse QUL_TARGET_TOOLCHAIN_DIR to set the location for the toolchain.
-DQUL_TARGET_TOOLCHAIN_DIR=/path/to/the/toolchain
-DQUL_TARGET_TOOLCHAIN_DIR=C:\path\to\the\toolchain

Note: The toolchain located in the given QUL_TARGET_TOOLCHAIN_DIR must match the toolchain specified in the CMAKE_TOOLCHAIN_FILE.

QUL_COLOR_DEPTHUse QUL_COLOR_DEPTH to set the color depth supported by the platform. The reference port for RH850/D1M1A 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.

PROBE_TYPEUse PROBE_TYPE to select a Renesas debug probe type that the Renesas Flash Programmer needs for flashing binaries. E1, E2, and E20 are the supported probe types.
-DPROBE_TYPE=E2

Note: The Renesas Flash Programmer uses the default probe type (E1) if this variable is not set.

QUL_BOARD_SDK_DIRSet the QUL_BOARD_SDK_DIR CMake cache entry to the Renesas Graphics Library installation path. For example:
-DQUL_BOARD_SDK_DIR=$HOME/Renesas_Electronics/D1x_RGL/rgl_ghs_D1Mx_obj_V2.1.0a
-DQUL_BOARD_SDK_DIR=C:\Renesas_Electronics\D1x_RGL\rgl_ghs_D1Mx_obj_V2.1.0a
Optional configuration for RH850/D1M1A
RENESAS_FLASH_PROGRAMMER_PATHSet the optional RENESAS_FLASH_PROGRAMMER_PATH CMake cache entry to the Renesas Flash Programmer installation path. For example:
-DRENESAS_FLASH_PROGRAMMER_PATH="$HOME/Renesas Electronics/Renesas Flash Programmer"
-DRENESAS_FLASH_PROGRAMMER_PATH="C:\Program Files (x86)\Renesas Electronics\Renesas Flash Programmer"

Note: Creates the flash targets if the Renesas Flash Programmer software kit is found.

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.