Troubleshooting Configuration Issues in Renesas RA Projects

This page describes how to troubleshoot configuration issues in projects using the Renesas RA BSP.

The BSP is derived from the original Renesas SDK that heavily relies on code generation to get different components working together. VisualGDB allows editing most configuration parameters of the Renesas SDKs via VisualGDB Project Properties -> Embedded Frameworks, however there are a few limitations:

  • Only one instance of the same component (e.g. UART0 vs UART1) is supported at the same time. Additional instances can be added manually.
  • Properties in the original SDK that are automatically computed via JavaScript need to be set manually.
  • Properties where the default value depends on the component instance number need to be set manually.

In order to facilitate working around these limitations, VisualGDB provides several troubleshooting techniques described on this page.

Troubleshooting Generated Configuration Files

In some cases, the default values placed in the generated configuration files will not work out-of-the-box. This happens when these values recursively rely on other properties in a non-trivial way, e.g. the activation source for the Data Transfer Controller:You can troubleshoot this type of issues via a checkbox at the bottom of the Embedded Frameworks page:Once checked, press “Apply” to regenerate the configuration files (we recommend checking them into source control before changing them). Each line that was generated based on configuration variables will now have a comment showing the original template: You can enter the full variable names (e.g. module.driver.transfer.activation_source) in the filter field to quickly locate the corresponding property:

Values Generated via JavaScript

Some properties rely on JavaScript to generate the correct values. E.g. setting the UART Baud Rate setting in VisualGDB will result in the following code in hal_data.c:

baud_setting_t               g_uart0_baud_setting =

Using the native Renesas tools will generate a different value:

baud_setting_t g_uart0_baud_setting =
    .abcse = 0, .abcs = 0, .bgdm = 1, .cks = 0, .brr = 12, .mddr = (uint8_t) 256, .brme = false 

This happens because the original Renesas SDK uses JavaScript to compute some property values, and VisualGDB does not support it. As a workaround, you can paste the generated values directly in the Framework Configuration in VisualGDB GUI to achieve the same results:If you are using Advanced CMake, you can easily set multiple configuration variables by editing the FWCONFIGURATION part of the find_bsp() statement:

Overriding Individual Files

The configuration files generated by VisualGDB are designed to be overridden if necessary, so they follow the structure shown below:

#include "hal_data_override.h"
<actual file contents>

If you would like to manually patch some of the files, we recommend using the following setup:

  1. Make sure the original generated file is checked into source control (e.g. Git).
  2. Define the OVERRIDE_<file_name> macro via the BSP-level properties (see below).
  3. Copy the overridden file into override_<file name> and check it into source control.
  4. Do your modifications to the overridden file.
  5. Whenever VisualGDB regenerates the original configuration file after a change of settings, use the source control to see the exact changes, and manually apply them to the override file.

You can define preprocessor macros on the BSP level as shown below:

Managing Interrupt Handlers

VisualGDB can automatically generate the vector_data.h and vector_data.c files, connecting peripheral-specific interrupts to SDK-supplied interrupt handlers. You can customize which interrupts get placed in the vector_data files via the interrupt priority settings (1) for optional interrupts and the separate Interrupts property group for the interrupts that are mandatory in the original SDKs (2):