I am using the RL78 CC-RL compiler.
The addresses of variables are being specified using #pragma address. Can these variables be initialized in the default startup routine?
The variables which specify addresses in #pragma address are allocated in sections which are not default.
In the default startup routine only the .bss, .sbss, .data, and .sdata sections can be initialized.
Sections newly created by #pragma address cannot be initialized.
If you need to initialize the sections, add the processing in the startup routine.
For how to initialize in units of section, see the CC-RL user’s manual below.
CC-RL Compiler User's Manual
8.2.6 Initialization of RAM area section
|CS+ (formerly CubeSuite+)|
|C Compiler Package for RL78 Family|