Skip to main content
Renesas Electronics Europe - Knowledgebase

Initialization of variables specified in #pragma address(CC-RL)

Last Updated:06/21/2017


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

Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family