OUTPUT
Compilation Unit
-Cc
None
None
None
#pragma INTO_ROM: Put Next Variable Definition into ROM
The -Cc command line option puts const objects into the ROM_VAR segment, which the Linker parameter file assigns to a ROM section (refer Linker section in the Build Tool Utilities Reference Manual).
The Linker does not initialize objects allocated into a read-only section. The startup code does not have to copy the constant data.
You may also put variables into the ROM_VAR segment by using the segment pragma (refer Linker section in the Build Tool Utilities manual). Using the #pragma CONST_SECTION for constant-segment allocation, the Compiler allocates const variables into the ROM_VAR segment.
If the current data segment is not the default segment, const objects remain in the user-defined segment. If the data segment contains onlyconst objects, the Compiler may allocate the segment to a ROM memory section (refer to the Linker section in the Build Tool Utilities Reference Manual for more information).
The following listing shows how the -Cc compiler option affects the SECTIONS segment of a PRM file (HIWARE object-file format only).
SECTIONS MY_ROM READ_ONLY 0x1000 TO 0x2000 PLACEMENT DEFAULT_ROM, ROM_VAR INTO MY_ROM
Linker Manual
-F (-Fh, -F1, -F1o, -F2, -F2o,-F6, or -F7): Object-File Format option