C
Command-line setup for Renesas boards
This page provides instructions on how to set up your development environment for Renesas boards using the command line.
Before you begin
Install the common and board-specific prerequisites before you configure the command-line environment. For more information, see Prerequisites.
This page uses QUL_ROOT
and QUL_TOOLS
in command line examples as if they were set as environment variables. For example:
export QUL_ROOT=$HOME/Qt/QtMCUs/2.2 export QUL_TOOLS=$HOME/Qt/Tools/QtMCUs
set QUL_ROOT=C:\Qt\QtMCUs\2.2 set QUL_TOOLS=C:\Qt\Tools\QtMCUs
Warning: Building with the Ninja generator fails with incremental builds on GHS. Qt recommends using NMake Makefiles or NMake Makefiles JOM.
Setting up a development environment for RH850/D1M1A
Configure the following CMake variables for RH850/D1M1A. For more information, see the CMake Manual.
Variable | Procedure |
---|---|
Qul_ROOT | Set 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_PLATFORM | The 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. |
FREERTOS_DIR | Absolute 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_FILE | Set 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_DIR | Use 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_COLOR_DEPTH | Use 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_TYPE | Use 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 ( |
QUL_BOARD_SDK_DIR | Set 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_PATH | Set 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. |
Setting up a development environment for EK-RA6M3G
Configure the following CMake variables for EK-RA6M3G. For more information, see the CMake Manual.
Variable | Procedure |
---|---|
Qul_ROOT | Set 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_PLATFORM | Use ek-ra6m3g-baremetal to set up the platform for the EK-RA6M3G board.-DQUL_PLATFORM=ek-ra6m3g-baremetal |
CMAKE_TOOLCHAIN_FILE | Set 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_DIR | Use 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_DEPTH | Use 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_DIR | Set 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_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: -DJLINK_PATH=/opt/SEGGER/JLink -DJLINK_PATH=C:\tools\SEGGER\JLink Notes
|
Setting up a development environment for EK-RA8D1
Variable | Procedure |
---|---|
QUL_PLATFORM | Use 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 valid also for the EK-RA8D1.
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.
Building an example application with prebuilt Qt Quick Ultralite libraries
Building an example application for RH850/D1M1A
The following command builds the minimal
example for RH850/D1M1A:
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/ghs.cmake -DQUL_TARGET_TOOLCHAIN_DIR=/opt/ghs/comp_201815 -DQUL_PLATFORM=rh850-d1m1a-baremetal -DQUL_BOARD_SDK_DIR=$HOME/Renesas_Electronics/D1x_RGL/rgl_ghs_D1Mx_obj_V2.1.0a -DRENESAS_FLASH_PROGRAMMER_PATH="$HOME/Renesas Electronics/Renesas Flash Programmer" 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\ghs.cmake -DQUL_TARGET_TOOLCHAIN_DIR=C:\ghs\comp_201815 -DQUL_PLATFORM=rh850-d1m1a-baremetal -DQUL_BOARD_SDK_DIR=C:\Renesas_Electronics\D1x_RGL\rgl_ghs_D1Mx_obj_V2.1.0a -DRENESAS_FLASH_PROGRAMMER_PATH="C:\Program Files (x86)\Renesas Electronics\Renesas Flash Programmer" cmake --build .
Building an example application for EK-RA6M3G
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_10 -DQUL_PLATFORM=EK-RA6M3G-baremetal -DQUL_BOARD_SDK_DIR=$QUL_TOOLS/Renesas/fsp-4.2.0 -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_10 -DQUL_PLATFORM=EK-RA6M3G-baremetal -DQUL_BOARD_SDK_DIR=%QUL_TOOLS%\Renesas\fsp-4.2.0 -DJLINK_PATH=%PROGRAMFILES%\SEGGER\JLink cmake --build .
Building an example application for EK-RA8D1
The following command builds the minimal
example for EK-RA8D1:
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_12_2_mpacbti_rel1 -DQUL_PLATFORM=EK-RA8D1-baremetal -DQUL_BOARD_SDK_DIR=$QUL_TOOLS/Renesas/fsp-5.1.0 -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_12_2_mpacbti_rel1 -DQUL_PLATFORM=EK-RA8D1-baremetal -DQUL_BOARD_SDK_DIR=%QUL_TOOLS%\Renesas\fsp-5.1.0 -DJLINK_PATH=%PROGRAMFILES%\SEGGER\JLink cmake --build .
Flashing the example application
Once you have successfully built the minimal
example application, use the following command to flash it:
cmake --build . --target flash_minimal
Note: The same procedure applies to any other application.
Available under certain Qt licenses.
Find out more.