C

Getting started on Renesas

Overview

This topic provides all the necessary information to get started on the Renesas platforms supported by Qt Quick Ultralite.

Note: Make sure you have all the prerequisites installed before setting up the development environment.

Setting up the development environment

Configuring the Qt Creator IDE

To develop for MCUs using the Qt Creator IDE, the MCU plugin is required. Qt Online Installer enables it by default when you install the Qt for MCUs SDK.

To build and run your application on MCUs, you must create a kit:

  1. Select Edit > Preferences > Devices > MCU.

    Note: If you cannot see the MCU tab, select Help > About Plugins, enable the McuSupport plugin, and restart Qt Creator to apply changes.

  2. If not already set, provide the path to the Qt for MCUs installation directory.

    {MCU preferences}

  3. Select a Target supported by the Qt for MCUs SDK. For example, Qt for MCUs 2.10.0 - EK-RA6M3G-BAREMETAL 16bpp.
  4. In the Requirements section, ensure that the platform-specific requirements are met.
  5. Select Automatically create kits for all available targets on start to create kits automatically.

    Note: You can also create/update kits manually using Create Kit and Update Kit.

  6. Select Apply and restart Qt Creator if you choose to create kits automatically.

Configuring CMake variables

You can also set up the development environment from the command prompt. For more information on how to use CMake with Qt Quick Ultralite when developing applications for Renesas boards, see CMake manual for Renesas RA boards and CMake manual for Renesas RH boards.

Building applications with prebuilt Qt Quick Ultralite libraries

Building applications using Qt Creator IDE

  1. Open the CMake project file for the example you want to build.
  2. In the Configure Project window:
    1. Select the kit you created earlier. For example, Qt for MCUs 2.10.0 - EK-RA6M3G-BAREMETAL 16bpp.
    2. Select Configure Project.

{MCU project configuration}

Once the project is configured, select Run or press Ctrl+r on your keyboard to build and flash the binary to the target.

Building applications using the command prompt

You can also build applications from the command prompt. The examples below illustrate how to build the minimal example for EK-RA6M3G, EK-RA8D1, and RH850/D1M1A.

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.10.0
export QUL_TOOLS=$HOME/Qt/Tools/QtMCUs
set QUL_ROOT=C:\Qt\QtMCUs\2.10.0
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.

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_12_3_1 -DQUL_PLATFORM=EK-RA6M3G-baremetal -DQUL_BOARD_SDK_DIR=$QUL_TOOLS/Renesas/fsp-5.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_12_3_1 -DQUL_PLATFORM=EK-RA6M3G-baremetal -DQUL_BOARD_SDK_DIR=%QUL_TOOLS%\Renesas\fsp-5.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.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_12_2_mpacbti_rel1 -DQUL_PLATFORM=EK-RA8D1-baremetal -DQUL_BOARD_SDK_DIR=%QUL_TOOLS%\Renesas\fsp-5.2.0 -DJLINK_PATH=%PROGRAMFILES%\SEGGER\JLink
cmake --build .

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 .

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.

Debugging using Renesas e2 Studio

You can use Renesas e2 studio to debug applications built with Qt Quick Ultralite.

Debugging applications on RA boards

The following instructions guide you to start debugging on RA boards.

Note: The RA6M3G board is used in the example below.

  1. Open Renesas e2 studio.
  2. Create new C/C++ Project.
  3. Select Renesas Debug Only Project > Next.
  4. Enter Project name and select Next.
  5. Select Debug Hardware > Hardware and from there the debug probe you have. For example, J-Link Arm.
  6. Select Device Settings > Target Device > RA > RA/RA6 > R7FA6M3AH.
  7. Provide the executable path to the binary you want to debug. For example, C:\Qt\QtMCUs\2.7.0\examples\chess\chess.elf.
  8. Select Finish.
  9. Select Launch in 'Debug' mode.
  10. GDB server will upload your binary to the target and start debugging.

Debugging applications on RH boards

The following instructions guide you to start debugging on RH boards.

Note: The RH850 board is used in the example below.

  1. Open Renesas e2 studio.
  2. Create new C/C++ Project.
  3. Select Renesas Debug Only Project > Next.
  4. Enter Project name and select Next.
  5. Select Debug Hardware > Hardware and from there the debug probe you have. For example, E1 (RH850) or E2 (RH850).
  6. Select Device Settings > Target Device > RH850 > RH850/D1M1A-V2 > R7F701462.
  7. Provide the executable path to the binary you want to debug. For example, C:\Qt\QtMCUs\2.7.0\examples\chess\chess.run.
  8. Select Finish.
  9. Select Launch in 'Debug' mode.
  10. GDB server will upload your binary to the target and start debugging.

Supported Renesas Boards

Tier 1: Reference Targets

Hardware boardMCUCompilerOperating system(s)
RH850/D1M1A Evaluation BoardRH850/D1M1A (R7F701461)Green Hills MULTI 7.1.6, Compiler 2015.1.7 or 2018.1.5AUTOSAR Classic Platform, Bare Metal

Tier 2: Verified Targets

Hardware boardMCUCompilerOperating system(s)
EK-RA6M3GR7FA6M3AH3CFCGNU Arm GCC 12.3.rel1, IAR Build Tools for Arm V9.40Bare Metal, FreeRTOS
EK-RA8D1 (Technology Preview)R7FA8D1BHECBDGNU Arm GCC 12.2.MPACBTI-Rel1Bare Metal

Available under certain Qt licenses.
Find out more.