Data Definition
#pragma INTO_ROM
None
None
None
This pragma forces the next (non-constant) variable definition to be const (together with the -Cc compiler option).
The pragma is active only for the next single variable definition. A subsequent segment pragma (CONST_SEG, DATA_SEG, CODE_SEG) disables the pragma.
The following listing presents some examples which use the INTO_ROM pragma.
#pragma INTO_ROM char *const B[] = {"hello", "world"}; #pragma INTO_ROM int constVariable; /* put into ROM_VAR, .rodata */ int other; /* put into default segment */ #pragma INTO_ROM #pragma DATA_SEG MySeg /* INTO_ROM overwritten! */ int other2; /* put into MySeg */