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.

Command line setup

To get started from the command prompt, ensure that the following environment variables are set:

  • Qul_DIR to the Qt for MCUs SDK install path.


    • <QT_INSTALL_PATH> is the Qt install directory,
    • and <VERSION> is the directory containing the Qt Quick Ultralite version you are using, for example 1.8.0.
  • For RH850-D1M1A:
    • Create the GHS_COMPILER_DIR environment variable and set it to the GHS Compiler installation path. For example:

      Linux host:

      export GHS_COMPILER_DIR=/usr/ghs/comp_201815

      Windows host:

      set GHS_COMPILER_DIR=C:\ghs\comp_201815
    • Create the RGL_DIR environment variable and set it to the Renesas Graphics Library installation path. For example:

      Linux host:

      export RGL_DIR=/home/$USER/Renesas_Electronics/D1x_RGL/rgl_ghs_D1Mx_obj_V1.9.1a

      Windows host:

      set RGL_DIR=C:\Renesas_Electronics\D1x_RGL\rgl_ghs_D1Mx_obj_V1.9.1a
  • Set the following optional variables for EK-RA6M3G if needed:
    • Set the JLINK_PATH environment variable to the SEGGER J-Link installation path if it is not installed in the default location. For example:

      Linux host:

      export JLINK_PATH=/opt/SEGGER/JLink

      Windows host:

      set JLINK_PATH=C:\tools\SEGGER\JLink

      Note: Ensure that the environment variable value does not contain spaces.

      Flash targets are created if the J-Link software kit is found.

    • To provide customized Renesas e2 generated project files, set the EK_RA6M3G_E2_PROJECT_PATH environment variable to the root of the Renesas e2 studio project. For example:

      Linux host:

      export EK_RA6M3G_E2_PROJECT_PATH=/home/$USER/e2_studio/workspace/<project_name>

      Windows host:

      set EK_RA6M3G_E2_PROJECT_PATH=C:\Users\<user>\e2_studio\workspace\<project_name>
  • Set the following optional variables for RH850-D1M1A if needed:
    • Set the RenesasFlashProgrammer_PATH environment variable to the Renesas Flash Programmer installation path. For example:

      Linux host:

      export RenesasFlashProgrammer_PATH=/home/$USER/Renesas Electronics/Renesas Flash Programmer

      Windows host:

      set RenesasFlashProgrammer_PATH=C:\Program Files (x86)\Renesas Electronics\Renesas Flash Programmer

      Flash targets are created if the Renesas Flash Programmer software kit is found.

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.

Optional environment variables

Build configuration

Configure the following CMake variables. For more information, see the CMake Manual.

QUL_PLATFORMThe 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.
CMAKE_TOOLCHAIN_FILESet it to the GHS toolchain for RH850-D1M1A, and armgcc or IAR toolchain for EK-RA6M3G.

Linux host:


Windows host:

QUL_COLOR_DEPTHThe color depth supported by the platform you have chosen. For example, set it to 32-bit for RH850-D1M1A.

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

PROBE_TYPEOption available only for RH850-D1M1A platform. Select a debug probe to be used by the Renesas Flash Programmer. Supported probes: E1, E2, and E20.

Note: The default probe type (E1) is used if the variable is not set.

Building applications with prebuilt Qt Quick Ultralite libraries

The following command builds the minimal example for EK-RA6M3G:

Linux host:

cd $Qul_DIR/examples/minimal
mkdir build
cd build
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$Qul_DIR/lib/cmake/Qul/toolchain/armgcc.cmake -DQUL_PLATFORM=EK-RA6M3G-baremetal
cmake --build .

Windows host:

cd %Qul_DIR%\examples\minimal
mkdir build
cd build
cmake .. -G "Ninja" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=%Qul_DIR%\lib\cmake\Qul\toolchain\armgcc.cmake -DQUL_PLATFORM=EK-RA6M3G-baremetal
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.