SLAU131V October 2004 – February 2020
/*******************************************************/
/* Sample command file with SECTIONS directive */
/*******************************************************/
file1.c.obj file2.c.obj /* Input files */
--output_file=progr.out /* Options */
SECTIONS
{
.bss : load = RAM
.text : load = FLASH
.const : load = FLASH
.vectors : load = 0xFFE0
{
t1.c.obj (.intvec1)
t2.c.obj (.intvec2)
}
.data:alpha : align = 16
.data:beta : align = 16
}
Figure 8-2 shows the output sections defined by the SECTIONS directive in Example 5 (.vectors, .text, .const, .bss, .data:alpha, and .data:beta) and shows how these sections are allocated in memory using the MEMORY directive given in Example 3.