Configuring Sparklet for RA6M3G

In RA6M3G, the configurations are done by the FSP. An example FSP configuration window is shown below.

Stack Configuration

Stack Configuration window

The components required to execute the required project can be enabled from selecting the required ones from the components tab in the Stack configuration window. The configurations for the components are done in the FSP configuration and Sparklet runs on these configurations.

The initialisation API for Sparklet has to be called from the thread created for the Sparklet.

Other Considerations

Some of the memory is allocated by external code and is used inside Sparklet. For example, certain RAM addresses are allocated by business logic and provided to Sparklet via sgui_get_ram_bin_addr() (in ra6m3_bsp.c). These sections must be aligned for certain boundaries for proper operation, otherwise leading to memory alignment exceptions. It can be achieved via attribute alignment:

 1#define RAM_BIN_BUF_SIZE       (256)
 2uint8_t u8_ram_bin_buf [RAM_BIN_BUF_SIZE];
 3void *sgui_get_ram_bin_addr (int32_t u32_offset)
 4{
 5 if (u32_offset >= RAM_BIN_BUF_SIZE)
 6              {
 7               sgui_app_report_error(11, 11, NULL);
 8              }
 9
10             return &u8_ram_bin_buf [u32_offset];
11}