C
Command-line Setup for Renesas Boards
Assuming that the prerequisites are installed, the following subsections provide instructions to set up your environment using the command line.
Note: This page uses QUL_ROOT
and QUL_TOOLS
in command line examples as if they were set as environment variables. They could be set for example:
export QUL_ROOT=$HOME/Qt/QtMCUs/2.0.0 export QUL_TOOLS=$HOME/Qt/Tools/QtMCUs
set QUL_ROOT=C:\Qt\QtMCUs\2.0.0 set QUL_TOOLS=C:\Qt\Tools\QtMCUs
Warning: Buiding with the Ninja generator fails with incremental builds on GHS. It is recommended to use NMake Makefiles or NMake Makefiles JOM. If Ninja generator is still used CMake will display a warning.
Build configuration
Configure the following CMake variables. For more information, see the CMake Manual.
Variable | Value |
---|---|
Qul_ROOT | Set 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_PLATFORM | The platform must be set to the corresponding board and the OS you plan to use. Use the ek-ra6m3g-baremetal or rh850-d1m1a-baremetal depending on your hardware.-DQUL_PLATFORM=rh850-d1m1a-baremetal |
CMAKE_TOOLCHAIN_FILE | Set it to the appropriate toolchain configuration file. For RH850-D1M1A, set it to GHS toolchain, and for EK-RA6M3G, set it to Arm GCC or IAR toolchain.Linux host:-DCMAKE_TOOLCHAIN_FILE=$QUL_ROOT/lib/cmake/Qul/toolchain/ghs.cmake Windows host:-DCMAKE_TOOLCHAIN_FILE=%QUL_ROOT%\lib\cmake\Qul\toolchain\ghs.cmake |
QUL_TARGET_TOOLCHAIN_DIR | QUL_TARGET_TOOLCHAIN_DIR cmake cache entry needs to be used to provide the location of the used toolchain.Linux host:-DQUL_TARGET_TOOLCHAIN_DIR=/path/to/the/toolchain Windows host:-DQUL_TARGET_TOOLCHAIN_DIR=C:\path\to\the\toolchain |
QUL_COLOR_DEPTH | The color depth supported by the platform you have chosen. For example, set it to 32-bit for RH850-D1M1A.-DQUL_COLOR_DEPTH=32 Note: If this variable is not set, default color depth is used while configuring for the platform. |
For RH850-D1M1A: | |
PROBE_TYPE | Option available only for RH850-D1M1A platform. Select a debug probe to be used by the Renesas Flash Programmer. Supported probes: E1 , E2 , and E20 .-DPROBE_TYPE=E2 Note: The default probe type ( |
QUL_BOARD_SDK_DIR | Set the QUL_BOARD_SDK_DIR cmake cache entry it to the Renesas Graphics Library installation path. For example:Linux host:-DQUL_BOARD_SDK_DIR=$HOME/Renesas_Electronics/D1x_RGL/rgl_ghs_D1Mx_obj_V.2.0.0a Windows host:-DQUL_BOARD_SDK_DIR=C:\Renesas_Electronics\D1x_RGL\rgl_ghs_D1Mx_obj_V.2.0.0a |
RENESAS_FLASH_PROGRAMMER_PATH | Set the optional RENESAS_FLASH_PROGRAMMER_PATH CMake cache entry to the Renesas Flash Programmer installation path. For example:Linux host:-DRENESAS_FLASH_PROGRAMMER_PATH="$HOME/Renesas Electronics/Renesas Flash Programmer" Windows host:-DRENESAS_FLASH_PROGRAMMER_PATH="C:\Program Files (x86)\Renesas Electronics\Renesas Flash Programmer" Flash targets are created if the Renesas Flash Programmer software kit is found. |
For EK-RA6M3G: | |
QUL_BOARD_SDK_DIR | Set this variable to the Renesas FSP install path. For example:Linux host:-DQUL_BOARD_SDK_DIR=%QUL_TOOLS%/Renesas/fsp-<version> Windows host:-DQUL_BOARD_SDK_DIR=%QUL_TOOLS%\Renesas\fsp-<version> |
EK_RA6M3G_E2_PROJECT_PATH | To provide customized Renesas e2 generated project files, set the EK_RA6M3G_E2_PROJECT_PATH CMake cache entry to the root of the Renesas e2 studio project. For example:Linux host:-DEK_RA6M3G_E2_PROJECT_PATH=$HOME/e2_studio/workspace/<project_name> Windows host:-DEK_RA6M3G_E2_PROJECT_PATH=C:\Users\<user>\e2_studio\workspace\<project_name> |
JLINK_PATH | Set the JLINK_PATH CMake cache entry to the SEGGER J-Link installation path if it is not installed in the default location. For example:Linux host:-DJLINK_PATH=/opt/SEGGER/JLink Windows host:-DJLINK_PATH=C:\tools\SEGGER\JLink Note: Ensure that the entry value does not contain spaces. Flash targets are created if the J-Link software kit is found. |
Note: in a Qt Quick Ultralite project the CMAKE_BUILD_TYPE
CMake argument is by default set to MinSizeRel
. MinSizeRel
is the build type used for the pre-built platform libraries shipped with Qt Quick Ultralite. If you want to change the build type (e.g. to Release
) you can do so by invoking cmake with -DCMAKE_BUILD_TYPE=Release
. Please refer to this page for more information.
Building applications with prebuilt Qt Quick Ultralite libraries
The following command builds the minimal
example for EK-RA6M3G:
cd $QUL_ROOT/examples/minimal mkdir build cd build cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=MinSizeRel -DQul_ROOT=$QUL_ROOT -DCMAKE_TOOLCHAIN_FILE=$QUL_ROOT/lib/cmake/Qul/toolchain/armgcc.cmake -DQUL_TARGET_TOOLCHAIN_DIR=$QUL_TOOLS/arm_gcc_9 -DQUL_PLATFORM=EK-RA6M3G-baremetal -DJLINK_PATH=/opt/SEGGER/JLink cmake --build .
cd %QUL_ROOT%\examples\minimal mkdir build cd build cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=MinSizeRel -DQul_ROOT=%QUL_ROOT% -DCMAKE_TOOLCHAIN_FILE=%QUL_ROOT%\lib\cmake\Qul\toolchain\armgcc.cmake -DQUL_TARGET_TOOLCHAIN_DIR=%QUL_TOOLS%\arm_gcc_9 -DQUL_PLATFORM=EK-RA6M3G-baremetal -DJLINK_PATH=C:\tools\SEGGER\JLink cmake --build .
Once you have successfully built the minimal
example application, use the following command to flash it:
cmake --build . --target flash_minimal
The same procedure applies to any other application.
Available under certain Qt licenses.
Find out more.