9. Quick Start for Renesas RISC-V MCU
9.1. Supported Environments
Operating System |
Windows: Windows 10 / Windows 11 Linux: Ubuntu 22.04 |
VS Code version |
1.96.0 (minimum) |
VS Code can be downloaded and installed from this page https://code.visualstudio.com/.
9.2. Installation
To utilise the Renesas VS Code extensions 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.
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.
Open the System Environment Variables configuration, and add the following variables:
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).
Guide for managing System Environment Variables
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).
Alternatively, Windows Prerequisites can be installed with Windows Package Manager Command Line Tool winget (*). Please run the following commands in Windows Command Prompt:
winget install Kitware.CMake
winget install Ninja-build.Ninja
(*) The winget is a command line tool enables users to discover, install, upgrade, remove and configure applications on Windows 10 and Windows 11 computers. This tool is the client interface to the Windows Package Manager service. It is a straightforward process if you want to use winget package manager for CMake and Ninja Build installation. For more information about winget, please visit: https://learn.microsoft.com/en-us/windows/package-manager/winget/
Installing Python 3.10:
Install the 64-bit version of the Python 3.10 into your system.
Add the path of the folder the Python 3.10 into the “Path” environment variable.
Guide to add Python 3.10 folder 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
Installing the latest RISC-V MCU Smart Configurator (RISC-V MCU SC):
Download and install the latest version of RISC-V MCU Smart Configurator:
Installing Support Files for RISC-V MCU Development:
Install the RISC-V MCU support files from the [Renesas Support Files Manager] by following the instructions in chapter “Managing Support Files”.
Installing “LLVM for Renesas RISC-V MCU” toolchain for RISC-V MCU Project Build:
For RISC-V MCU projects, it is recommended to use “LLVM for Renesas RISC-V MCU” toolchain.
Download and install the latest toolchain:
https://llvm-gcc-renesas.com/riscv/riscv-download-toolchains
Add the bin folder of the toolchain as “RENESAS_RISCV_LLVM_TOOLCHAIN_PATH” to the environment variables.
Configuring RENESAS_RISCV_LLVM_TOOLCHAIN_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
Click to “New…”.
Enter the “RENESAS_RISCV_LLVM_TOOLCHAIN_PATH” to the Variable name field, and click to “Browse Directory…” to select the bin folder of the toolchain. Then click “OK”.
Installing the Dependent Packages:
Run the following commands to refresh the package lists, and install the dependent packages:
sudo apt update sudo apt install cmake ninja-build libusb-1.0-0-dev python3.10-dev
Installing the latest RISC-V MCU Smart Configurator (RISC-V MCU SC):
Download and install the latest version of RISC-V MCU Smart Configurator:
Installing Support Files for RISC-V MCU Development:
Install the RISC-V MCU support files from the [Renesas Support Files Manager] by following the instructions in chapter “Managing Support Files”.
Installing “LLVM for Renesas RISC-V MCU” toolchain for RISC-V MCU Project Build:
For RISC-V MCU projects, it is recommended to use “LLVM for Renesas RISC-V MCU” toolchain.
Download and install the latest toolchain:
https://llvm-gcc-renesas.com/riscv/riscv-download-toolchains
Add the bin folder of the toolchain as “RENESAS_RISCV_LLVM_TOOLCHAIN_PATH” to the environment variables.
Guide for Configuring RENESAS_RISCV_LLVM_TOOLCHAIN_PATH environment variable
For adding RENESAS_RISCV_LLVM_TOOLCHAIN_PATH variable to environment variables, open .bashrc file in the home folder of the current user, then add the following line:
export RENESAS_RISCV_LLVM_TOOLCHAIN_PATH="<bin folder of the LLVM for Renesas RISC-V MCU Toolchain>"
For instance:
export RENESAS_RISCV_LLVM_TOOLCHAIN_PATH="/home/renesas/toolchains/llvm_19.1.7.202501_riscv-elf/bin"
9.3. Creating a Project
Smart Configurator can be accessed from the VS Code command palette to create a project for the RISC-V MCU device family.
Open [Command Palette] and select [Renesas: Create RISC-V MCU Project with Smart Configurator] from the commands.
VSCode will show installed [RISC-V MCU Smart Configurator] list, select a [Smart Configurator] from the list.
Note
If an RISC-V MCU Smart Configurator is not detected automatically, the message “No RISC-V MCU Smart Configurator installation found!” will be displayed in VSCode:
Please click “Browse RISC-V MCU SC”, then select the location of the RISC-V MCU Smart Configurator binary (“SmartConfigurator.exe” for Windows). When a select file dialog window appears, the extension will automatically store the location of the RISC-V MCU Smart Configurator for the next use.
Select a [Folder] to create the project.
Enter [File name], configure your board and device type, select [LLVM for RISC-V Toolchain], and then click [Next].
Choose a [project template] then click [Finish] to complete the project creation steps.
Click [Generate Code] and close [RISC-V MCU Smart Configurator] after generation of the project files completes.
9.4. Building the Project
For building a project, which has been created with RISC-V MCU 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]”.
Then, run the “CMake: Build” command.
TIP: For more information about RISC-V MCU Smart Configurator, click here to visit the RISC-V MCU Smart Configurator page.
9.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.
