1 /*- SRAM0 memory region -*/
2 define symbol __region_RAM0_size__ = 0x10000 ;
3 define symbol __region_RAM0_start__ = 0x20000000 ;
4 define symbol __region_RAM0_end__ = __region_RAM0_start__+__region_RAM0_size__-1 ;
6 export symbol __region_RAM0_size__ ;
7 export symbol __region_RAM0_start__ ;
8 export symbol __region_RAM0_end__ ;
10 /*- SRAM1 memory region -*/
11 define symbol __region_RAM1_size__ = 0x8000 ;
12 define symbol __region_RAM1_start__ = 0x20080000 ;
13 define symbol __region_RAM1_end__ = __region_RAM1_start__+__region_RAM1_size__-1 ;
15 export symbol __region_RAM1_size__ ;
16 export symbol __region_RAM1_start__ ;
17 export symbol __region_RAM1_end__ ;
19 /*- Continous SRAM region (SRAM0 is mirrored) -*/
20 define symbol __region_RAM_size__ = __region_RAM0_size__+__region_RAM1_size__ ;
21 define symbol __region_RAM_start__ = __region_RAM1_start__-__region_RAM0_size__ ;
22 define symbol __region_RAM_end__ = __region_RAM1_end__ ;
24 export symbol __region_RAM_size__ ;
25 export symbol __region_RAM_start__ ;
26 export symbol __region_RAM_end__ ;
28 /*- NFC SRAM region -*/
29 define symbol __region_NFC_RAM_start__ = 0x20100000 ;
30 define symbol __region_NFC_RAM_end__ = 0x20100FFF ;
32 export symbol __region_NFC_RAM_start__ ;
33 export symbol __region_NFC_RAM_end__ ;
36 define symbol __region_ROM_size__ = 0x00080000 ;
37 define symbol __region_ROM_start__ = 0x00080000 ;
38 define symbol __region_ROM_end__ = __region_ROM_start__+__region_ROM_size__-1 ;
40 export symbol __region_ROM_size__ ;
41 export symbol __region_ROM_start__ ;
42 export symbol __region_ROM_end__ ;
45 define symbol __size_cstack__ = 0x1000 ;
46 define symbol __size_heap__ = 0x1000 ;
48 /* Size of the IRQ Stack (Main Stack).*/
49 define symbol __ICFEDIT_size_irqstack__ = 0x1000 ;
51 define memory mem with size = 4G ;
52 define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__];
53 define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM_end__];
55 define block CSTACK with alignment = 8, size = __size_cstack__ {section CSTACK};
56 define block IRQSTACK with alignment = 8, size = __ICFEDIT_size_irqstack__ {};
57 define block SYSHEAP with alignment = 8 {section SYSHEAP};
58 define block DATABSS with alignment = 8 {readwrite, zeroinit};
60 initialize by copy { readwrite };
61 do not initialize { section .noinit };
63 keep { section .vtable };
65 place at start of ROM_region {section .vtable};
66 place in ROM_region {readonly};
67 place at start of RAM_region {block IRQSTACK};
68 place in RAM_region {block DATABSS};
69 place in RAM_region {block SYSHEAP};
70 place at end of RAM_region {block CSTACK};