C

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

Build configuration

Configure the following CMake variables when developing applications for Renesas RA boards.

Setting up a development environment for EK-RA6M3G

Configure the following CMake variables for EK-RA6M3G.

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_PLATFORMUse ek-ra6m3g-baremetal to set up the platform for the EK-RA6M3G board.
-DQUL_PLATFORM=ek-ra6m3g-baremetal
FREERTOS_DIRAbsolute path to the FreeRTOS sources directory. It is required for FreeRTOS targets only. Refer to FreeRTOS platforms for more information about boards on FreeRTOS.
-DFREERTOS_DIR=< FreeRTOS directory path >
CMAKE_TOOLCHAIN_FILESet the CMAKE_TOOLCHAIN_FILE to the Arm GCC or IAR toolchain.
-DCMAKE_TOOLCHAIN_FILE=$QUL_ROOT/lib/cmake/Qul/toolchain/armgcc.cmake
-DCMAKE_TOOLCHAIN_FILE=%QUL_ROOT%\lib\cmake\Qul\toolchain\armgcc.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
QUL_COLOR_DEPTHUse QUL_COLOR_DEPTH to set the color depth supported by the platform. The reference port for EK-RA6M3G supports 16bpp color depth.
-DQUL_COLOR_DEPTH=16

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

QUL_BOARD_SDK_DIRSet this variable to the Renesas Flexible Software Package (FSP) install path.

For example:

-DQUL_BOARD_SDK_DIR=$QUL_TOOLS/Renesas/fsp-<version>
-DQUL_BOARD_SDK_DIR=%QUL_TOOLS%\Renesas\fsp-<version>
JLINK_PATHSet the JLINK_PATH CMake cache entry to the SEGGER J-Link installation path if it is not installed in the default location.

For example:

-DJLINK_PATH=/opt/SEGGER/JLink
-DJLINK_PATH=C:\tools\SEGGER\JLink

Notes

  • Make sure that the entry value does not contain spaces.
  • Creates flash targets if the J-Link software kit is found.

Setting up a development environment for EK-RA8D1

VariableProcedure
QUL_PLATFORMUse ek-ra8dm1-baremetal to set up the platform for the EK-RA8D1 board.
-DQUL_PLATFORM=ek-ra8dm1-baremetal

The CMake values for EK-RA6M3G are also valid for EK-RA8D1 apart from the board-specific QUL_PLATFORM variable (ek-ra8dm1-baremetal) and FREERTOS_DIR, which is not valid for EK-RA8D1 as it has only the baremetal platform adaptation.

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.