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:
|
Step 1: Install the latest CMake for Windows.
-
Download the latest version of CMake for Windows.
-
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.
-
Download the latest version of Ninja for Windows.
-
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.
-
Use Windows Search to find and open "Edit the system environment variables"
-
In the "Advanced" tab, click on the "Environment Variables…" button to open the "Environment Variables" dialog.
-
Select to edit the "Path".
-
Add CMake’s bin folder to the "Path" environment variable, then perform the following steps:
-
Add the path of CMake’s bin folder if it is not defined during the CMake installation. (e.g. C:\Program Files\CMake\bin).
-
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 |
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 |
|
RA |
|
RH850 |
|
RL78 |
|
RX |
|
RZ |
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)":
-
Download and install the GNU Arm Embedded Toolchain 9 (2019-Q4) from the link below:
-
Configure the Path environment variable, and add the bin folder of the toolchain to the Path environment variables.
Note
|
Configure the "Path" environment variable
|
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":
-
Download and install the latest toolchain:
-
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 installing "LLVM Embedded Toolchain for Arm":
-
Download and install the latest toolchain:
-
Add the bin folder of the toolchain as "ARM_LLVM_TOOLCHAIN_PATH" to the environment variables.
Note
|
Configuring ARM_LLVM_TOOLCHAIN_PATH environment variable:
|
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:
-
Download the latest e2 studio:
-
Install e2 studio with RX Device Family and CC-RX toolchain:
Select RX Device Family.
Select latest CC-RX toolchain.
-
Use e2 studio to create an RX CC-RX project:
-
Build RX CC-RX project once to initialize the Renesas build utilities folder:
Tip
|
Navigate to Renesas build utilities folder:
|
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:
|
For installing "GCC for Renesas GNURX":
-
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:
-
First, run
sudo apt update
command to refresh the package lists.$ sudo apt update
-
Then, install CMake and Ninja Build packages by using
sudo apt install cmake ninja-build
command.$ sudo apt install 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
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)":
-
Download and install the GNU Arm Embedded Toolchain 9 (2019-Q4) from the link below:
-
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
For instance:
|
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":
-
Download and install the latest toolchain:
-
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
For instance:
|
For installing "LLVM Embedded Toolchain for Arm":
-
Download and install the latest toolchain:
-
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
For instance:
|
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 ( |
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)":
-
Download and install the GNU Arm Embedded Toolchain 9 (2019-Q4) from the link below:
-
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
For instance:
|
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":
-
Download and install the latest toolchain:
-
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
For instance:
|
For installing "LLVM Embedded Toolchain for Arm":
-
Download and install the latest toolchain:
-
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
For instance:
|
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:
-
For debugging in device families Dialog, RA, RL78, RX and RZ, install 64-bit version of the Python 3.10.
-
Add the path of the folder the Python 3.10 into the "Path" environment variable.
-
Use Window search to find and open "Edit the system environment variables"
-
In "Advanced" tab, click on "Environment Variables…" button to open "Environment Variables" dialog
-
Select to edit "Path"
-
Add the path of Python 3.10 folder
-
Click OK to close the dialog
-
For debugging in device family RH850, R-Car:
-
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).
-
Add the path of the Python 2.7.18 installation into the "Path" environment variable.
-
Use Window search to find and open "Edit the system environment variables"
-
In "Advanced" tab, click on "Environment Variables…" button to open "Environment Variables" dialog
-
Select to edit "Path"
-
Add the path of Python folder
-
Click OK to close the dialog
-
1.2.2.2. Ubuntu:
-
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
-
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 ( |
-
Install XZ Archive Manager by using
brew install xz
command.$ brew install xz
-
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.
-
Open "VS Code" and navigate to "Extensions" section.
-
Search for "Renesas"
-
Click to "Install" button for both extensions "Renesas Build Utilities" and Renesas Debug".