Pular para o conteúdo principal
Renesas Brasil - Knowledgebase

How to allocate initial values to data flash area in CA78K0R compiler?

Latest Updated:11/21/2014


I am using the CA78K0R compiler for RL78 and 78K0R products. Please show me how to allocate initial values to the data flash area.


Allocating constant initial values requires either of the following definitions.

  • In the source file, define values by specifying addresses within flash memory for const constants.
  • In the link directive file, add a definition for the data flash area.

Example of a definition in a C-source file:

#pragma section @@CNSTL DFL_C AT 0F1000H
__far const unsigned char dfl_data_c[]={0x11,0x22,0x33,0x44}; 
#pragma section @@CNSTL @@CNSTL

Example of a definition in the link directive file:
MEMORY DATFL : (0F1000H,1000H)
Suitable Products
C Compiler Package for RL78 and 78K Families
Compiler for RL78 Family and 78K0R [CA78K0R]