Good evening

I have tried a few ways of placing functions in RAM. I am trying to do this so i can write data into my user data flash on the RX630 from the user boot area.

Initially i placed the functions in the .data section and this placed the functions in RAM but the return from the function would fail as if the stack was damaged.

I then created a new section in the middle of the RAM called .rtdata and added my functions to that section. This works 100% when using the E1 debugger. When i remove power the functions disappear and the code does not run.

How can i safely add my functions to RAM so they do not cause trouble with the variables placed after the .data area and be available after power up?


e2studio v5.4.0.018 & GCC for Renesas Windows

.data -> 0x0000

.gcc_exc -> after .data

.bss -> after .gcc_exc

.rtdata -> 0x4000

ustack -> 0x17000

istack -> 0x17FFF

function desc:

unsigned int __attribute__((section(“.rtdata”),noinline))program_flash_block (volatile unsigned short *rom)


unsigned int __attribute__((section(“.data”),noinline))program_flash_block (volatile unsigned short *rom)



Darius Galis selected answer