SPRU513Z August 2001 – October 2023 SM320F28335-EP
The RAM model Initializes variables at load time. To use this method, invoke the linker with the --ram_model option.
This model may reduce boot time and save memory used by the initialization tables.
When you use the --ram_model linker option, the linker sets the STYP_COPY bit in the .cinit section's header. This tells the loader not to load the .cinit section into memory. (The .cinit section occupies no space in the memory map.)
For COFF, the linker also sets the cinit symbol to -1 (normally, cinit points to the beginning of the initialization tables). This indicates to the boot routine that the initialization tables are not present in memory; accordingly, no run-time initialization is performed at boot time.
For EABI, the linker sets __TI_CINIT_Base equal to __TI_CINIT_Limit to indicate there are no .cinit records.
A COFF loader must be able to perform the following tasks to use initialization at load time:
For EABI, the loader copies values directly from the .data section to memory.
Figure 3-4 illustrates the initialization of variables at load time for the COFF ABI..