1.1. Operating Environment

Operating System

For Windows: Windows 10 / Windows 11

For Linux: Ubuntu 22.04

For macOS: macOS 14 Sonoma (Apple silicon)

VS Code version

1.93.0 (minimum)

VS Code can be downloaded and installed from this page https://code.visualstudio.com/.

1.2. Installing Prerequisites for the Development Environment

Before installing the extensions, it is required to follow the instructions below to install and configure the dependencies. It is recommended to avoid using space character in the installation paths as they may interpreted as delimiters by CMake and the other build tools.

1.2.1. Prerequisites for Building

In order to build a Renesas project in VS Code, the following prerequisites setup steps need to be performed. If building Renesas projects in VS Code is not desired this setup can be skipped (the installation of Renesas Build Utilities (renesas-build-utilities) extension is not required in this case).

1.2.1.1. Windows:

To utilise the build extension on Windows, it’s necessary to install "CMake" and "Ninja Build" for project build operations. You can install "CMake" and "Ninja Build" by downloading their latest installers.

Note

Some projects require "MinGW Makefiles" instead of "Ninja Build" as the CMake Generator for Windows. If you are planning to setup a development environment for these specific targets, please follow the additional installation instructions in chapter "4.2.11. Setting up a build environment with MinGW over MSYS2 for Windows" for installing the build prerequisites for development.

Projects that require MinGW Makefiles on Windows:

  • R-Car Projects

  • RZ/N Projects generated by RZ/N Smart Configurator

Step 1: Install the latest CMake for Windows.

  1. Download the latest version of CMake for Windows.

  2. Install CMake for Windows.

    Important!: You must add the CMake folders to the "Path" environment variable. The Windows Installer of CMake has an option to modify the system’s environment variables and add the CMake folders to the "Path" variable. Please select this option during installation. If you are not using the installer or this option is not selected during installation, please use the following notes to manually add CMake’s bin folder to the Path variable.

Step 2: Install the latest Ninja Build for Windows.

  1. Download the latest version of Ninja for Windows.

  2. Extract the downloaded zip file (ninja-win.zip) and place the ninja.exe into a folder. (e.g.: C:\Tools\ninja-build\ninja.exe).

Step 3: Configure the Path environment variable.

  1. Use Windows Search to find and open "Edit the system environment variables"

    installation env variables1
  2. In the "Advanced" tab, click on the "Environment Variables…​" button to open the "Environment Variables" dialog.

  3. Select to edit the "Path".

    installation env variables2
  4. Add CMake’s bin folder to the "Path" environment variable, then perform the following steps:

  5. Add the path of CMake’s bin folder if it is not defined during the CMake installation. (e.g. C:\Program Files\CMake\bin).

  6. Add the path of the ninja.exe folder. (e.g. C:\Tools\ninja-build).

Note

Alternatively, CMake and Ninja Build can be installed with Windows Package Manager Command Line Tool winget, please follow the instructions in "Installing CMake and Ninja Build using winget" if you want to install CMake and Ninja Build using winget.

Then, install the latest (or suggested) toolchains for a target device family and add the path of the desired toolchain’s bin folder to the "Path" environment variable.

Device Family

Recommended Toolchain

Dialog

GNU Arm Embedded Toolchain 9 (2019-Q4)

RA

Arm GNU Toolchain

LLVM Embedded Toolchain for Arm

RH850

CC-RH

RL78

CC-RL

GCC for Renesas RL78

LLVM for Renesas RL78

RX

CC-RX

GCC for Renesas GNURX

RZ

Arm GNU Toolchain

Additional recommendations for Dialog:

For Dialog projects, it is recommended to use the "GNU Arm Embedded Toolchain 9 (2019-Q4)" and the "Dialog Audio Development Platform" during project development (Customers can have access the Audio Development Platform (ADP) software upon request).

Step 1: Installing the "GNU Arm Embedded Toolchain 9 (2019-Q4)":

  1. Download and install the GNU Arm Embedded Toolchain 9 (2019-Q4) from the link below:

  2. Configure the Path environment variable, and add the bin folder of the toolchain to the Path environment variables.

Note

Configure the "Path" environment variable

  1. Use Windows Search to find and open "Edit the system environment variables"

    installation env variables1
  2. In the "Advanced" tab, click on the "Environment Variables…​" button to open the "Environment Variables" dialog.

  3. Select "Path", and then click to the "Edit" to edit the definition.

    installation env variables2
  4. Add the bin folder of the toolchain to the "Path" environment variable, then save the changes.

Additional recommendations for RA:

For RA projects, it is recommended to install RA Smart Configurator and one of the preferred toolchain.

Step 1: Install the latest RA Smart Configurator (RASC):

Download and install the latest version of RA Smart Configurator:

Step 2: Install one of the preferred toolchains for RA Project Build. It is recommended to use either "Arm GNU Toolchain" or "LLVM Embedded Toolchain for Arm".

For installing "Arm GNU Toolchain":

  1. Download and install the latest toolchain:

  2. Add the bin folder of the toolchain as "ARM_GCC_TOOLCHAIN_PATH" to the environment variables.

Note

Configuring ARM_GCC_TOOLCHAIN_PATH environment variable:

  1. Use Window search to find and open "Edit the system environment variables"

    installation env variables1
  2. In "Advanced" tab, click on "Environment Variables…​" button to open "Environment Variables" dialog

  3. Click to "New…​".

    installation env variables nv
  4. Enter the "ARM_GCC_TOOLCHAIN_PATH" to the Variable name field, and click to "Browse Directory…​" to select the bin folder of the toolchain. Then click "OK".

    installation env variables arm gcc

For installing "LLVM Embedded Toolchain for Arm":

  1. Download and install the latest toolchain:

  2. Add the bin folder of the toolchain as "ARM_LLVM_TOOLCHAIN_PATH" to the environment variables.

Note

Configuring ARM_LLVM_TOOLCHAIN_PATH environment variable:

  1. Use Window search to find and open "Edit the system environment variables"

    installation env variables1
  2. In "Advanced" tab, click on "Environment Variables…​" button to open "Environment Variables" dialog

  3. Click to "New…​".

    installation env variables nv
  4. Enter the "ARM_LLVM_TOOLCHAIN_PATH" to the Variable name field, and click to "Browse Directory…​" to select the bin folder of the toolchain. Then click "OK".

    installation env variables arm llvm
Additional recommendations for RX:

For RX projects, it is recommended to install RX Smart Configurator and one of the preferred toolchain.

Step 1: Install the latest RX Smart Configurator (RX SC):

Download and install the latest version of RX Smart Configurator

Step 2: Install one of the preferred toolchains for RX Project Build. It is recommended to use either "CC-RX" with e2 studio or "GCC for Renesas GNURX".

For installing CC-RX with e2 studio:

  1. Download the latest e2 studio:

  2. Install e2 studio with RX Device Family and CC-RX toolchain:

    Select RX Device Family.

    installation ccrx e2studio1

    Select latest CC-RX toolchain.

    installation ccrx e2studio2
  3. Use e2 studio to create an RX CC-RX project:

  4. Build RX CC-RX project once to initialize the Renesas build utilities folder:

    installation ccrx e2studio3
Tip

Navigate to Renesas build utilities folder:

  1. Open "Help" menu and click "About e2 studio"

    installation ccrx e2studio tips1
  2. Click "Installation Details"

    installation ccrx e2studio tips2
  3. Select "Support Folder" and click the "e2 studio support area" link

    installation ccrx e2studio tips3
Note

For building CC-RX projects without using RX Smart Configurator, add "BIN_RX", "INC_RX" and "TMP_RX" variables to the environment variables with the following values:

  • BIN_RX: bin folder of the CC-RX toolchain (e.g.: C:\Toolchains\CCRX\3_6_0\bin).

  • INC_RX: include folder of the CC-RX toolchain (e.g.: C:\Toolchains\CCRX\3_6_0\include).

  • TMP_RX: root folder of the CC-RX toolchain (e.g.: C:\Toolchains\CCRX\3_6_0).

For installing "GCC for Renesas GNURX":

  1. Download and install the latest toolchain:

1.2.1.2. Ubuntu:

To utilise the build extension on Linux, install "CMake" and "Ninja Build" for project build operations. Please follow the instructions below to install "CMake" and "Ninja Build".

Note

R-Car development requires "Unix Makefiles" instead of "Ninja Build" as the CMake Generator for Linux. If you are planning to setup a development environment only for R-Car, you can skip installing the "Ninja Build" package.

Step 1: Install CMake and Ninja Build:

  1. First, run sudo apt update command to refresh the package lists.

    $ sudo apt update
    ubuntu apt update
  2. Then, install CMake and Ninja Build packages by using sudo apt install cmake ninja-build command.

    $ sudo apt install cmake ninja-build
    ubuntu apt cmake ninja build

Step 2: Check CMake version:

  • You can verify the current installed version of CMake by running cmake --version command as shown below:

    $ cmake --version
    ubuntu cmake version

Step 3: Check Ninja Build version:

  • You can also verify the current installed version of Ninja Build by running ninja --version command as shown below:

    $ ninja --version
    ubuntu ninja version
Additional recommendations for Dialog:

For Dialog projects, it is recommended to use the "GNU Arm Embedded Toolchain 9 (2019-Q4)" and the "Dialog Audio Development Platform" during project development (Customers can have access the Audio Development Platform (ADP) software upon request).

Step 1: Installing the "GNU Arm Embedded Toolchain 9 (2019-Q4)":

  1. Download and install the GNU Arm Embedded Toolchain 9 (2019-Q4) from the link below:

  2. Configure the PATH environment variable, and add the bin folder of the toolchain to the PATH environment variables.

Note

Configure the "PATH" environment variable

For configuring PATH environment variable, open .bashrc file in the home folder of the current user, then add the following line:

export PATH="<bin folder of the Arm GNU Toolchain>:$PATH"

For instance:

export PATH="/home/renesas/gcc-arm-none-eabi-9-2019-q4-major/bin:$PATH"
Additional recommendations for RA:

Developing RA projects in Linux environment, it is recommended to install RA Smart Configurator and one of the preferred toolchain.

Step 1: Install the latest RA Smart Configurator (RASC):

Download and install the latest version of RA Smart Configurator:

Step 2: Install one of the preferred toolchains for RA Project Build. It is recommended to use either "Arm GNU Toolchain" or "LLVM Embedded Toolchain for Arm".

For installing "Arm GNU Toolchain":

  1. Download and install the latest toolchain:

  2. Add the bin folder of the toolchain as "ARM_GCC_TOOLCHAIN_PATH" to the environment variables.

Note

Configuring ARM_GCC_TOOLCHAIN_PATH environment variable:

For adding ARM_GCC_TOOLCHAIN_PATH variable to environment variables, open .bashrc file in the home folder of the current user, then add the following line:

export ARM_GCC_TOOLCHAIN_PATH="<bin folder of the Arm GNU Toolchain>"

For instance:

export ARM_GCC_TOOLCHAIN_PATH="/home/renesas/arm-gnu-toolchain-13.2.Rel1-darwin-arm64-arm-none-eabi/bin"

For installing "LLVM Embedded Toolchain for Arm":

  1. Download and install the latest toolchain:

  2. Add the bin folder of the toolchain as "ARM_LLVM_TOOLCHAIN_PATH" to the environment variables.

Note

Configuring ARM_LLVM_TOOLCHAIN_PATH environment variable:

For adding ARM_LLVM_TOOLCHAIN_PATH variable to environment variables, open .bashrc file in the home folder of the current user, then add the following line:

export ARM_LLVM_TOOLCHAIN_PATH="<bin folder of the LLVM Embedded Toolchain for Arm>"

For instance:

export ARM_LLVM_TOOLCHAIN_PATH="/home/renesas/LLVMEmbeddedToolchainForArm-17.0.1-Darwin/bin"

1.2.1.3. macOS:

To utilise the build extension on macOS, it’s necessary to install "CMake" and "Ninja Build" for project build operations. You can install "CMake" and "Ninja Build" by performing the following steps.

Note

Installation steps for macOS are using Homebrew (brew), which is an open-source software package management system that simplifies the installation of software for macOS. For installation and more information about Homebrew, please refer to https://brew.sh/.

Step 1: Install CMake and Ninja Build

  • Install CMake and Ninja Build packages by using brew install cmake ninja command.

    $ brew install cmake ninja

Step 2: Check CMake version:

  • You can verify the current installed version of CMake by running cmake --version command as shown below:

    $ cmake --version

Step 3: Check Ninja Build version:

  • You can also verify the current installed version of Ninja Build by running ninja --version command as shown below:

    $ ninja --version
Additional recommendations for Dialog:

For Dialog projects, it is recommended to use the "GNU Arm Embedded Toolchain 9 (2019-Q4)" and the "Dialog Audio Development Platform" during project development (Customers can have access the Audio Development Platform (ADP) software upon request).

Step 1: Installing the "GNU Arm Embedded Toolchain 9 (2019-Q4)":

  1. Download and install the GNU Arm Embedded Toolchain 9 (2019-Q4) from the link below:

  2. Configure the PATH environment variable, and add the bin folder of the toolchain to the PATH environment variables.

Note

Configure the "PATH" environment variable

For configuring PATH environment variable, open .zprofile file in the home folder of the current user, then add the following line:

export PATH="<bin folder of the Arm GNU Toolchain>:${PATH}"

For instance:

export PATH="/Users/renesas/gcc-arm-none-eabi-9-2019-q4-major/bin:${PATH}"
Additional recommendations for RA:

Developing RA projects in macOS environment, it is recommended to install RA Smart Configurator and one of the preferred toolchain.

Step 1: Install the latest RA Smart Configurator (RASC):

Download and install the latest version of RA Smart Configurator:

Step 2: Install one of the preferred toolchains for RA Project Build. It is recommended to use either "Arm GNU Toolchain" or "LLVM Embedded Toolchain for Arm".

For installing "Arm GNU Toolchain":

  1. Download and install the latest toolchain:

  2. Add the bin folder of the toolchain as "ARM_GCC_TOOLCHAIN_PATH" to the environment variables.

Note

Configuring ARM_GCC_TOOLCHAIN_PATH environment variable:

For adding ARM_GCC_TOOLCHAIN_PATH variable to environment variables, open .zprofile file in the home folder of the current user, then add the following line:

export ARM_GCC_TOOLCHAIN_PATH="<bin folder of the Arm GNU Toolchain>"

For instance:

export ARM_GCC_TOOLCHAIN_PATH="/Users/renesas/arm-gnu-toolchain-13.2.Rel1-darwin-arm64-arm-none-eabi/bin"

For installing "LLVM Embedded Toolchain for Arm":

  1. Download and install the latest toolchain:

  2. Add the bin folder of the toolchain as "ARM_LLVM_TOOLCHAIN_PATH" to the environment variables.

Note

Configuring ARM_LLVM_TOOLCHAIN_PATH environment variable:

For adding ARM_LLVM_TOOLCHAIN_PATH variable to environment variables, open .zprofile file in the home folder of the current user, then add the following line:

export ARM_LLVM_TOOLCHAIN_PATH="<bin folder of the LLVM Embedded Toolchain for Arm>"

For instance:

export ARM_LLVM_TOOLCHAIN_PATH="/Users/renesas/LLVMEmbeddedToolchainForArm-17.0.1-Darwin/bin"

1.2.2. Prerequisites for Debugging

In order to start a debugging session in a Renesas project in VS Code, the following prerequisites setup steps need to be performed. If debugging Renesas projects in VS Code is not desired this setup can be skipped (the installation of the Renesas Debug extension is not required in this case).

Device Family

Required Python Version

Dialog, RA, RL78, RX, RZ

Python 3.10 (64 bit version)

RH850, R-Car

Python 2.7.18 (32 bit version)

1.2.2.1. Windows:

In the debug session, Dialog, RA, RL78, RX and RZ device families require Python 3.10 and an RH850, R-Car requires a 32-bit version of Python 2.7. For Windows, Renesas Debug extension automatically extracts a local copy of the required version of Python into the support files folder, if Python is not installed or included in the PATH. Developers can choose to manage and install the Python requirements manually by following this guideline, or they can skip the Python installation and leave the operation to the Renesas Debug extension.

For debugging in device families Dialog, RA, RL78, RX and RZ:

  1. For debugging in device families Dialog, RA, RL78, RX and RZ, install 64-bit version of the Python 3.10.

  2. Add the path of the folder the Python 3.10 into the "Path" environment variable.

    1. Use Window search to find and open "Edit the system environment variables"

      installation env variables1
    2. In "Advanced" tab, click on "Environment Variables…​" button to open "Environment Variables" dialog

    3. Select to edit "Path"

      installation env variables2
    4. Add the path of Python 3.10 folder

      installation env variables3 python3
    5. Click OK to close the dialog

For debugging in device family RH850, R-Car:

  1. For debugging in device family RH850, R-Car, install a 32-bit version of the Python 2.7.18 (Important!: 32-bit Python is needed even in 64-bit OS environment).

  2. Add the path of the Python 2.7.18 installation into the "Path" environment variable.

    1. Use Window search to find and open "Edit the system environment variables"

      installation env variables1
    2. In "Advanced" tab, click on "Environment Variables…​" button to open "Environment Variables" dialog

    3. Select to edit "Path"

      installation env variables2
    4. Add the path of Python folder

      installation env variables3 python2
    5. Click OK to close the dialog

1.2.2.2. Ubuntu:

  1. If you are running 64-bit Ubuntu version, enable running 32-bit app in 64-bit Ubuntu by executing the following command:

    $ sudo dpkg --add-architecture i386
  2. Then, update the package list and install the following packages:

    $ sudo apt update
    $ sudo apt install libusb-1.0-0-dev libc6:i386 libncurses5:i386 libstdc++6:i386

For debugging in device families Dialog, RA, RL78, RX and RZ:

  • Install Python 3.10 libraries for debugging in device families Dialog, RA, RL78, RX and RZ. Use the following command to install the required libraries:

    $ sudo apt install python3.10-dev

For debugging in device family RH850, R-Car:

  • Install Python 2.7 libraries for debugging in RH850, R-Car device family. Use the following command to install the required libraries:

    $ sudo apt install python2.7-dev

1.2.2.3. macOS:

To utilise the debug extension on macOS, it’s necessary to install XZ Archive Manager and Python 3.10 for debug operations. You can install required packages by performing the following steps.

Note

Installation steps for macOS use Homebrew (brew), which is an open-source software package management system that simplifies the installation of software for macOS. For installation and more information about Homebrew, please refer to https://brew.sh/.

  1. Install XZ Archive Manager by using brew install xz command.

    $ brew install xz
  2. Specific version of the Python is required for debugging, for debugging in Dialog RA, RL78 and RX device families macOS, install Python 3.10 by using the following command:

    $ brew install [email protected]

1.2.2.4. Additional Steps for RA Debugging:

You must install the support files and register/import the RA Smart Configurator in VS Code before starting the debug session with RA devices. Please follow the instructions in section "4.1.9. Setting up the RA Debug Environment for VS Code".

1.2.2.5. Additional Drivers for Debugging Connection:

Both for Windows and Linux operating systems, you may need to download and install additional USB drivers for establishing a proper connection with the emulators and devices.

Using Renesas Emulators:

If you are using Renesas Emulators, please install the latest drivers before starting your debug session. Use the following link to download the drivers suitable for your operating system and device:

For other Renesas emulators, please check for any recommended drivers:

Using SEGGER J-Link connection:

Install the latest SEGGER J-Link drivers before starting your debug session. Use the following link to download the J-Link drivers suitable for your operating system:

1.3. Installing the Renesas Extensions

Renesas provides 2 extensions to help building and debugging Renesas C/C++ project in VS Code, these are Renesas Build Utilities (renesas-build-utilities) and Renesas Debug (renesas-debug) extensions. Latest versions of these extensions can be installed from extension marketplace directly. Developers can follow the steps below to install the latest versions of the extensions from extension marketplace.

  1. Open "VS Code" and navigate to "Extensions" section.

    installation vscode1
  2. Search for "Renesas"

  3. Click to "Install" button for both extensions "Renesas Build Utilities" and Renesas Debug".

    installation vscode2

< Renesas VS Code Extensions User Guide

2. Creating and Building a Project >