1.1. Operating Environment

Operating System

For Windows: Windows 10 / Windows 11

For Linux: Ubuntu 22.04

VS Code version

1.86.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).

Windows:

To utilize 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.

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" enviroment 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 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

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 RA:

For RA projects, it is recommended to install RA Smart Configurator and one of the prefered 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 prefered 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 building CC-RX projects, 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).

Ubuntu:

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

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 Verson

RA, R-Car, RL78, RX, RZ

Python 3.10 (64 bit version)

RH850

Python 2.7.18 (32 bit version)

Windows:

In the debug session, RA, R-Car, RL78, RX and RZ device families require Python 3.10 and an RH850 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 RA, R-Car, RL78, RX and RZ:

  1. For debugging in device families RA, R-Car, 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:

  1. For debugging in device family RH850, 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

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 RA, R-Car, RL78, RX and RZ:

  • Install Python 3.10 libraries for debugging in device families RA, R-Car, 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:

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

    $ sudo apt install python2.7-dev

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 >