1 # Scatter-Loading description file \<device\>_ac6.sct {#linker_sct_pg}
3 A scatter file for linking is required when using a \ref startup_c_pg.
5 The \ref linker_sct_pg contains regions for:
6 - Code (read-only data, execute-only data)
7 - RAM (read/write data, zero-initialized data)
10 - Stack seal (for Armv8-M/v8.1-M)
11 - CMSE veneer (for Armv8-M/v8.1-M)
13 Within the scatter file, the user needs to specify a set of macros. The scatter file is passed through the
14 C preprocessor which uses these macros to calculate the start address and the size of the different regions.
17 /*--------------------- Flash Configuration ----------------------------------
18 ; <h> Flash Configuration
19 ; <o0> Flash Base Address <0x0-0xFFFFFFFF:8>
20 ; <o1> Flash Size (in Bytes) <0x0-0xFFFFFFFF:8>
22 *----------------------------------------------------------------------------*/
23 #define __ROM_BASE 0x00000000
24 #define __ROM_SIZE 0x00080000
26 /*--------------------- Embedded RAM Configuration ---------------------------
27 ; <h> RAM Configuration
28 ; <o0> RAM Base Address <0x0-0xFFFFFFFF:8>
29 ; <o1> RAM Size (in Bytes) <0x0-0xFFFFFFFF:8>
31 *----------------------------------------------------------------------------*/
32 #define __RAM_BASE 0x20000000
33 #define __RAM_SIZE 0x00040000
35 /*--------------------- Stack / Heap Configuration ---------------------------
36 ; <h> Stack / Heap Configuration
37 ; <o0> Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
38 ; <o1> Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
40 *----------------------------------------------------------------------------*/
41 #define __STACK_SIZE 0x00000200
42 #define __HEAP_SIZE 0x00000C00
44 /*--------------------- CMSE Veneer Configuration ---------------------------
45 ; <h> CMSE Veneer Configuration
46 ; <o0> CMSE Veneer Size (in Bytes) <0x0-0xFFFFFFFF:32>
48 *----------------------------------------------------------------------------*/
49 #define __CMSEVENEER_SIZE 0x200
53 The stack is placed at the end of the available RAM and is growing downwards
54 whereas the Heap is placed after the application data and growing upwards.
56 ## Preprocessor command {#linker_sct_preproc_sec}
58 The scatter file uses following preprocessor command for Arm Compiler v6
60 #! armclang -E --target=arm-arm-none-eabi -mcpu=<mcpu> -xc