13. Quick Start for Renesas RH850
13.1. Supported Environments
Operating System |
Windows: Windows 10 / Windows 11 Linux: Ubuntu 22.04 / Ubuntu 24.04 |
VS Code version |
1.102.0 (minimum) |
VS Code can be downloaded and installed from this page https://code.visualstudio.com/.
13.2. Installation
Please choose your operating system for operating system dependent installation steps.
For the Renesas RH850 Family, Renesas Platform provides a straightforward installation wizard to install the CMake, Ninja, Python and the Support Files for RH850 Family. To set up your environment:
Open VS Code.
Navigate to the “Renesas” tab in VS Code. Then, click “Renesas Quick Install” in the “Environment” view.
Click the “Install” button for the “Renesas RH850” device family. The Renesas Platform will now check the dependencies required by the Renesas RH850 Device Family. The Renesas Platform extension will check the local environment and CMake, Ninja, Python and the Support Files for RH850 Family, then create an installation plan for them if necessary.
When your selection is ready, click the “Start Installations” button. The download and installation process will start automatically.
Installing the latest RH850 Smart Configurator (RH850 SC):
For RH850 projects, it is recommended to download and install the latest RH850 Smart Configurator.
https://www.renesas.com/en/software-tool/rh850-smart-configurator#downloads
Note
The Renesas Platform extension scans for changes at start-up, thus, after installing the Renesas RH850 Smart Configurator, please restart VS Code to force Renesas Platform to detect the recent RH850 Smart Configurator installation.
You can click “Manage Smart Configurators” to check the detected Smart Configurators. If it is not automatically detected, you can use the “Register SC” button to register the Smart Configurator manually by selecting the path of the Smart Configurator.
Installing “CC-RH” toolchains for RH850 Project Build:
For RH850 projects, it is recommended to install “CC-RH” toolchain. For installing “CC-RH”:
Download and install the latest toolchain:
https://www.renesas.com/us/en/software-tool/c-compiler-package-rh850-family
Note
CC-RH toolchain should be installed to a path that does not contain spaces or special characters.
Add “CC-RH” toolchain to Renesas Platform
Registering CC-RH toolchain in Renesas Platform
Open VS Code
Navigate to the “Renesas” tab in VS Code and click “Manage Build Tools”.
Click the “Register Toolchain” button in the Build Toolchains table header.
In the folder selection dialog, navigate to the root folder of the CC-RH toolchain (not the
binfolder).Select the folder and complete the toolchain registration.
Installing Additional Emulator Drivers
You may need to download and install additional USB drivers for establishing a connection with the emulators and devices. Please install the latest drivers before starting your debug session. Use the following links to download the drivers suitable for your operating system and device:
For the Renesas RH850 Family, Renesas Platform provides a straightforward installation wizard to install the CMake, Ninja, Python and the Support Files for RH850 Family. To set up your environment:
Open VS Code.
Navigate to the “Renesas” tab in VS Code. Then, click “Renesas Quick Install” in the “Environment” view.
Click the “Install” button for the “Renesas RH850” device family. The Renesas Platform will now check the dependencies required by the Renesas RH850 Device Family. The Renesas Platform extension will check the local environment and CMake, Ninja, Python and the Support Files for RH850 Family, then create an installation plan for them if necessary.
When your selection is ready, click the “Start Installations” button. The download and installation process will start automatically.
Most of the installations will be performed automatically, some installations may require manual interaction.
During the “Python 3.10” installation, the terminal wizard will appear for manual interaction. The terminal will show the execution plan and ask for confirmation before continuing. During the installation, it requires administrative rights to execute the installation, thus a password could be needed during the installation. Please make sure that the current user has “sudo” permissions and enter the password.
Installing “CC-RH” toolchains for RH850 Project Build:
For RH850 projects, it is recommended to install “CC-RH” toolchain. For installing “CC-RH”:
Download and install the latest toolchain:
https://www.renesas.com/us/en/software-tool/c-compiler-package-rh850-family
Installing Additional Emulator Drivers
You may need to download and install additional USB drivers for establishing a connection with the emulators and devices. Please install the latest drivers before starting your debug session. Use the following links to download the drivers suitable for your operating system and device:
For the Renesas RH850 Family, Renesas Platform provides a straightforward installation wizard to install the CMake, Ninja, Python and the Support Files for RH850 Family. To set up your environment:
Open VS Code.
Navigate to the “Renesas” tab in VS Code. Then, click “Renesas Quick Install” in the “Environment” view.
Click the “Install” button for the “Renesas RH850” device family. The Renesas Platform will now check the dependencies required by the Renesas RH850 Device Family. The Renesas Platform extension will check the local environment and CMake, Ninja, Python and the Support Files for RH850 Family, then create an installation plan for them if necessary.
When your selection is ready, click the “Start Installations” button. The download and installation process will start automatically.
Most of the installations will be performed automatically, some installations may require manual interaction.
During the “Python 3.10” installation, the terminal wizard will appear for manual interaction. The terminal will show the execution plan and ask for confirmation before continuing. During the installation, it requires administrative rights to execute the installation, thus a password could be needed during the installation. Please make sure that the current user has “sudo” permissions and enter the password.
Installing “CC-RH” toolchains for RH850 Project Build:
For RH850 projects, it is recommended to install “CC-RH” toolchain. For installing “CC-RH”:
Download and install the latest toolchain:
https://www.renesas.com/us/en/software-tool/c-compiler-package-rh850-family
Installing Additional Emulator Drivers
You may need to download and install additional USB drivers for establishing a connection with the emulators and devices. Please install the latest drivers before starting your debug session. Use the following links to download the drivers suitable for your operating system and device:
13.3. Creating a Project
For RH850 device family projects, Smart Configurator can be accessed via the “Create Project” view in the “Renesas” tab. Please use the following instructions to create and build a project for RH850 device family.
Navigate to “Renesas” and click [Create Renesas RH850 project] from the commands.
Select [Create RH850 Project with Smart Configurator] option from the list.
Then, VSCode will show installed [RH850 Smart Configurator] list, select a [Smart Configurator] from the list.
Select a [Folder] to create the project.
Enter [File name], configure your board and device type, select [Renesas CCRH850 Toolchain], and then click [Next].
Choose the [RTOS] configuration and continue by clicking [Next] (Continue with “No RTOS” for the sample project).
Click [Generate Code] and close [RH850 Smart Configurator] after generation of the project files completes.
13.4. Building the Project
For building a project, which has been created with RH850 Smart Configurator, please follow the steps below:
In the VS Code Command Palette, run the “CMake: Delete Cache and Reconfigure” command.
In the first time of running, a kit selection is shown. Select “[Unspecified]”.
In VS Code, click [Terminal] ⇒ [Run Build Task] from the menu. Alternatively, press ctrl+shift+B to quickly open the Build task.
Select [Build Project] from the commands.
TIP: For more information about RH850 Smart Configurator, click here to visit the RH850 Smart Configurator page.
13.5. Debugging the Project
A debug session can be started by selecting the created configuration and clicking the [Start Debugging] button in the [Run and Debug] tab, or pressing [F5] from the keyboard.
When VS Code starts the debug session, common debug control flow functions like resume, suspend, step into, step over, step out, restart, terminate debug session can be performed via the debug flow control buttons. Also, the [Debug Console] view will contain useful messages during the debug session.
During the debug session, details about the local variables, device registers, call stack, watched variables, states of the peripherals can be accessed at the primary sidebar of VS Code in the [Run and Debug] tab.
13.6. GDB Server launch parameters for RH850 devices
Reference for common parameters: All common server parameters, including default settings and options applicable to Renesas device families, are documented in the GDB Server Parameters section. The specific parameters of the RH850 devices are described below.
13.6.1. Connection Settings
13.6.1.1. Clock
Option |
Details |
|---|---|
|
Description: Configure the Main Clock Frequency.
Default Value: Dependent on target device.
Emulator: E1, E2
Available Values: 0.0001 to 99.9999 (in MHz). Values up to the second decimal place.
Example:
"serverParameters": { "-umFreq=": 16.00 } |
13.6.1.2. Connection
Option |
Details |
|---|---|
|
Description: Specify the emulator serial number to be connected.
Default Values: Auto (Emulator will be selected automatically.)
Emulator: E1, E2
Available Values: Emulator information with format: <emulator type>:<serial number>
Example:
"serverParameters": { "-sn=": "e2:_9es002310c" } |
|
Description: Select the LPD mode for the connection.
Default Value: 4 (LPD 4-pin)
Emulator: E1, E2
Available Values:
-ulpdType= 0: LPD 1-pin-ulpdType= 4: LPD 4-pin-ulpdType= 15: JTag (E2 only)Example:
"serverParameters": { "-ulpdType=": 4 } |
|
Description: Configure the LPD Clock Frequency.
Default Value: Default
Emulator: E1, E2
Available Values: Default, 3000, 5500, 11000, 16500, 20000, 25000, 33000, 40000, or any value from 0 to 99999 (in kHz).
Example:
"serverParameters": { "-ulpdFreq=": 3000 } or "serverParameters": { "-ulpdFreq=": "Default" }Note: Not active if LPD 1-pin is selected for Connection Type.
|
|
Description: Configure the LPD Baud Rate.
Default Value: Default
Emulator: E1, E2
Available Values: Default, 500, 1000, 2000, or any value from 0 to 9999 (in Kbps).
Example:
"serverParameters": { "-ulpdBaud=": 1000 } or "serverParameters": { "-ulpdBaud=": "Default" }Note: Not active if LPD 4-pin is selected for Connection Type.
|
|
Description: Configure the JTag Clock Frequency.
Default Value: Default
Emulator: E2
Available Values: Default, 6250, 11000, 16500, 20000, or any value from 0 to 99999 (in kHz).
Example:
"serverParameters": { "-uJTagClockFreq=": 6250 } or "serverParameters": { "-uJTagClockFreq=": "Default" }Note: Available when JTag connection type is selected.
|
|
Description: Specify whether to change option bytes to LPD setting before connecting.
Default Value: 1
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-setOptJtagLpd=": 1 } |
|
Description: Specify whether to change option bytes to JTAG (Nexus I/F) setting before disconnecting. If No is selected, the option bytes after disconnect is the LPD I/F.
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-setOptJtagJtag=": 0 } |
|
Description: Specify if connecting to an already running target system.
Default Value: 0
Emulator: E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-uHotPlug=": 0 } |
|
Description: Specifies whether to release the RESET before disconnecting from the target system.
Default Value: 0
Emulator: E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-releaseReset=": 0 } |
|
Description: Specifies whether to debug the initial stop/standby mode.
Default Value: 0
Emulator: E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-uInitialStop=": 0 } |
13.6.1.3. Power
Option |
Details |
|---|---|
|
Description: Select whether to supply power to the target board from emulator (MAX 200mA).
Default Value: 0
Emulator: E1, E2
Available Values:
-w 1: power target from emulator.-w 0: do not power target from emulator.Example:
"serverParameters": { "-w": 0 } |
|
Description: Select the power voltage supplied to the target board.
Default Value: 0 (3.3 V)
Emulator: E1, E2
Available Values:
-usupplyVoltage= 0: 3.3 V.-usupplyVoltage= 1: 5.5 V.Example:
"serverParameters": { "-usupplyVoltage=": 0 } |
13.6.1.4. Flash
Option |
Details |
|---|---|
|
Description: Specify the security ID (32 or 64 hex digits) for device boot.
Default Value:
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (dependent on target device).Emulator: E1, E2
Available Values: 0 to FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (32 or 64 hex digits depending on device).
Example:
"serverParameters": { "-usecurityID=": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" }Note: Depending on the device, switches between 32 digits or 64 digits.
|
|
Description: Specify the security ID (64 hex digits) for access to internal code flash memory.
Default Value: None
Emulator: E1, E2
Available Values: 0 to FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (64 hex digits).
Example:
"serverParameters": { "-ucodeFlashID=": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" }Note: Depending on the device, this option may not be active.
|
|
Description: Specify the security ID (64 hex digits) for access to internal data flash memory.
Default Value: None
Emulator: E1, E2
Available Values: 0 to FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF (64 hex digits).
Example:
"serverParameters": { "-udataFlashID=": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" }Note: Depending on the device, this option may not be active.
|
13.6.1.5. Security
Option |
Details |
|---|---|
|
Description: Specify whether to perform authentication in DLL format.
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-uneedAuthentication=": 0 } |
|
Description: Specify the full path of the authentication DLL file.
Default Value: None
Emulator: E1, E2
Available Values: Any valid file path.
Example:
"serverParameters": { "-uauthenticationDll=": "D:/dev_test/auth/authentication.dll" } |
13.6.1.6. SW-OPBT
Option |
Details |
|---|---|
|
Description: Set the Reset Vector for each core.
Default Value: None
Emulator: E2
Available Values: From 00000000 to FFFFFFFF.
Example:
"serverParameters": { "-uswOpbtRv=": "00000000" }Note: The number of parameters that need to be set depends on the target device.
|
|
Description: Set the OPBT value.
Default Value: None
Emulator: E2
Available Values: From 00000000 to FFFFFFFF.
Example:
"serverParameters": { "-uswOpbt=": "00000000" }Note: The number of parameters that need to be set depends on the target device.
|
|
Description: Set the ICUM OPBT value.
Default Value: None
Emulator: E2
Available Values: From 00000000 to FFFFFFFF.
Example:
"serverParameters": { "-uswOpbtIcum=": "00000000" }Note: The number of parameters that need to be set depends on the target device.
|
13.6.2. Debug Tool Settings
13.6.2.1. General Debug
Option |
Details |
|---|---|
|
Description: Select whether to reset the program after downloaded.
Default Value: 1
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-uresetOnReload=": 1 } |
13.6.2.2. Break
Option |
Details |
|---|---|
|
Description: Select whether to terminate peripheral emulation while stopping the program execution.
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-ustopPeriEmu=": 0 } |
13.6.2.3. Mask for Input Signal
Option |
Details |
|---|---|
|
Description: Configure Reset Signal Masking.
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-umaskReset=": 0 } |
|
Description: Configure the HLDRQ Signal Masking.
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-umaskHldrq=": 0 } |
|
Description: Configure STOP Signal Masking.
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-umaskStop=": 0 } |
|
Description: Configure WAIT Signal Masking.
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-umaskWait=": 0 } |
13.6.2.4. Memory
Option |
Details |
|---|---|
|
Description: Configure Memory Map mode.
Default Value: 0
Emulator: E2
Available Values: 0: Single map mode, 1: Double map mode
Example:
"serverParameters": { "-uMapMode=": 0 } |
|
Description: Configure if verify on write to memory is enabled.
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-uverifyOnWritingMemory=": 0 } |
|
Description: Specify the first address of the working RAM area for use by the debugger.
Default Value: Dependent on target device.
Emulator: E1, E2
Available Values: Any valid hex address.
Example:
"serverParameters": { "-uWorkRamAddress=": "0x20000000" } |
|
Description: Specifies whether to debug with Code SRAM.
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-uDebugCodeSRAM=": 0 } |
|
Description: Select whether to initialize RAM when connecting.
Default Value: 1
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-uInitialiseRAM=": 1 } |
13.6.2.5. Performance Timer
Option |
Details |
|---|---|
|
Description: Specify the operating frequency used to calculate the performance counter.
Default Value: None
Emulator: E1, E2
Available Values: Between 0.001 to 999.999 (in MHz). Value is converted to Hz internally.
Example:
"serverParameters": { "-uPTimerClock=": 16.00 }Note: It is possible to specify an empty value.
|
13.6.2.6. Reset With Running
Option |
Details |
|---|---|
|
Description: Use forced reset for the reset process during execution
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-uForceReset=": 0 } |
13.6.3. Multiple Core Settings
13.6.4. Trace
Option |
Details |
|---|---|
|
Description: Select the core for which trace data is collected.
The displayed core name depends on the target device.
Default Value: Enabled
Emulator: E1, E2
Available Values: Enabled, Disabled.
Example:
"serverParameters": { "-uTraceEnable=": "PE1|PE2" }Note: The parameter value contains the list of enabled cores separated by
|. Only cores set to Enabled are included in the parameter value.For example, if PE1 and PE2 are both Enabled, the value is
"PE1|PE2". If only PE1 is Enabled, the value is "PE1". |
|
Description: Set the CPU clock frequency in MHz to calculate trace timestamps.
The displayed core name depends on the target device.
Default Value: Depends on target device.
Emulator: E1, E2
Available Values: 1.0 to 9999.999 (in MHz).
Example:
"serverParameters": { "-uTraceClock=": "PE1|400.0|PE2|400.0" }Note: The parameter value contains pairs of core name and clock frequency separated by
|. Only cores set to Enabled are included in the parameter value.For example, if PE1 is 400.0 MHz and PE2 is 200.0 MHz, the value is
"PE1|400.0|PE2|200.0". If only PE1 is Enabled, the value is "PE1|400.0". |
|
Description: Synchronize trace data across cores.
Default Value: 0
Emulator: E1, E2
Available Values:
-uUseSyncTrace= 1: Yes — synchronize trace data across cores.-uUseSyncTrace= 0: No — do not synchronize trace data.Example:
"serverParameters": { "-uUseSyncTrace=": 0 } |
|
Description: Select the synchronization trace target standard for cross-core trace data.
Default Value: 0 - E2 Expansion (master)
Emulator: E1, E2
Available Values:
-uSyncTraceStandard= 0: E2 Expansion (master).-uSyncTraceStandard= 1: E2 Expansion (slave).-uSyncTraceStandard= 2: STM.Example:
"serverParameters": { "-uSyncTraceStandard=": 0 } |
|
Description: Configure whether to use ERAM trace.
Default Value: 0
Emulator: E1, E2
Available Values: 0: No, 1: Yes
Example:
"serverParameters": { "-uUseEramTrace=": 0 }Note: This option is supported only for RH850 U2B (without E) device
|
|
Description: Set the start address of the ERAM area used for ERAM trace.
Default Value: Depends on target device.
Emulator: E1, E2
Available Values: ERAM areas enabled on the target device.
Example:
"serverParameters": { "-uEramAddress=": "0x20000000" }Note: This option is supported only for RH850 U2B (without E) device
|