15. Troubleshooting and Common Issues

15.1. Setup environment when using renesas-amalgamator

When debugging with renesas-amalgamator users need to install Node.js. You can download and install Node.js from Node v16.20.0 (LTS).

15.2. Debugging failed with message: Don’t know how to attach. Try “help target”.

_images/vscode-debug-error1.png

If the debug session failed with the error message [Don’t know how to attach. Try “help target”.], then open the launch.json file and control the serverParameters array. There shouldn’t be any -uCore= parameter in the serverParameters array. Any definition of -uCore= needs to be removed from the serverParameters array.

15.3. Renesas extensions failed in macOS: “Error occurred during *.xz file extraction. Please check the installation requirements of Renesas VS Code Extensions.”

_images/error-macos-xz-extraction.png

If the error message “Error occurred during *.xz file extraction. Please check the installation requirements of Renesas VS Code Extensions.” appeared while using Renesas extensions in macOS, it is probably because the “XZ Archive Manager”, which is one of the prerequisites for using Renesas extensions in macOS, is not installed in the development environment.

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

$ brew install xz

Also, please refer to the installation steps in the section “Dependencies for macOS” to check any other steps missed during the setup.

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/.

15.4. Renesas Project Build is failing due to incorrect CMake Generator

Renesas build scripts require “Ninja Build” to run correctly. In development environments, where multiple CMake Generators are installed, developers needed to be aware of the selected CMake Generator during the build operation. If the build operation fails due to incorrect CMake Generator. Please check the following steps:

Step 1: Check the Ninja Build installation.

  1. Open a terminal window.

  2. Run the following command to check if “Ninja Build

    ninja --version
    
    _images/win-ninja-version.png
  3. If the command fails. Please check the installation guide and control the installation steps for Ninja Build in section “Installation”.

Step 2: Set the Ninja Build as the default Cmake Generator for the project

If Ninja Build is not the default CMake Generator in your environment, you can still define Ninja Build to be selected as the default Cmake Generator for your project. To make this definition, please follow the instructions below:

  1. Open VS Code settings using [File] => [Preferences] => [Settings] menu.

  2. Search for “cmake generator”, and switch to the [Workspace] tab.

  3. Then, set the value of the [Cmake: Generator] to “Ninja

    _images/ninja-as-default-generator.png

Note

Alternative Method: Changing the settings file directly

Alternatively, you can directly change the settings file of your project to make “Ninja” your CMake Generator for this project.

  1. Open the .vscode/settings.json file in your project folder.

  2. Insert the following definition into the file:

"cmake.generator": "Ninja"

Step 3: Delete the old build cache and rebuild the project

After making these changes, please delete the old build cache and rebuild the project again.

  1. Open VS Code command palette by running [View] => [Command Palette]

  2. Find and click to [CMake: Delete Cache and Reconfigure]

  3. Then, build the project again by opening the Command Palette again ([View] => [Command Palette]) and running the [CMake: Build] command.