_sbss = . ;
_szero = .;
*(.bss .bss.*)
*(COMMON)
. = ALIGN(4);
_ebss = . ;
_ezero = .;
} > ram
/* stack section */
.stack (NOLOAD):
{
. = ALIGN(8);
_sstack = .;
. = . + STACK_SIZE;
. = ALIGN(8);
_estack = .;
} > ram
/* .ARM.exidx is sorted, so has to go in its own output section. */
PROVIDE_HIDDEN (__exidx_start = .);
.ARM.exidx :
{
*(.ARM.exidx* .gnu.linkonce.armexidx.*)
} > ram
PROVIDE_HIDDEN (__exidx_end = .);
. = ALIGN(4);
_end = . ;
}
9.3
Sample Keil Scatter File
The following is the sample scatter file for Keil. The application code in
app.c
is loaded into LR_IRAM2
region.
LR_IRAM2 - This defines the user application section as defined in Figure 9-2. The user application code
and data resides on the same memory section. The start address and size of this section is limited as per
Figure 9-2.
LR_IRAM2 0x10009000 0x00017000 {
RW_IRAM2 0x10009000 0x00017000 { ; load address = execution address
app.o(+RO +RW +ZI)
.ANY (+RO +RW +ZI)
}
}
If the application is created in some other file name, be sure to edit the
app.c
file with correct object files.
The application file name must be updated in case of a different file name.
Note:
The
app.c
must contain the
int app_entry(void)
function and also must have
#define APP_STACK_SIZE (2048)
volatile unsigned char app_stack_patch[APP_STACK_SIZE];
ATSAMB11
©
2017 Microchip Technology Inc.
User Guide
DS70005335A-page 96