X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcpu%2Fcortex-m3%2Fscripts%2Fsam3x8_rom.icf;fp=bertos%2Fcpu%2Fcortex-m3%2Fscripts%2Fsam3x8_rom.icf;h=5823a01a61dc4f22c4eba2aeed76a6525f014633;hb=0867c8320cc00cd02813d80a9df5fc906ee94152;hp=0000000000000000000000000000000000000000;hpb=6b99bcc45c4e6fb69c597b0f5fa9532b1db711cf;p=bertos.git diff --git a/bertos/cpu/cortex-m3/scripts/sam3x8_rom.icf b/bertos/cpu/cortex-m3/scripts/sam3x8_rom.icf new file mode 100644 index 00000000..5823a01a --- /dev/null +++ b/bertos/cpu/cortex-m3/scripts/sam3x8_rom.icf @@ -0,0 +1,71 @@ +/*- SRAM0 memory region -*/ +define symbol __region_RAM0_size__ = 0x10000 ; +define symbol __region_RAM0_start__ = 0x20000000 ; +define symbol __region_RAM0_end__ = __region_RAM0_start__+__region_RAM0_size__-1 ; + +export symbol __region_RAM0_size__ ; +export symbol __region_RAM0_start__ ; +export symbol __region_RAM0_end__ ; + +/*- SRAM1 memory region -*/ +define symbol __region_RAM1_size__ = 0x8000 ; +define symbol __region_RAM1_start__ = 0x20080000 ; +define symbol __region_RAM1_end__ = __region_RAM1_start__+__region_RAM1_size__-1 ; + +export symbol __region_RAM1_size__ ; +export symbol __region_RAM1_start__ ; +export symbol __region_RAM1_end__ ; + +/*- Continous SRAM region (SRAM0 is mirrored) -*/ +define symbol __region_RAM_size__ = __region_RAM0_size__+__region_RAM1_size__ ; +define symbol __region_RAM_start__ = __region_RAM1_start__-__region_RAM0_size__ ; +define symbol __region_RAM_end__ = __region_RAM1_end__ ; + +export symbol __region_RAM_size__ ; +export symbol __region_RAM_start__ ; +export symbol __region_RAM_end__ ; + +/*- NFC SRAM region -*/ +define symbol __region_NFC_RAM_start__ = 0x20100000 ; +define symbol __region_NFC_RAM_end__ = 0x20100FFF ; + +export symbol __region_NFC_RAM_start__ ; +export symbol __region_NFC_RAM_end__ ; + +/*- Flash region -*/ +define symbol __region_ROM_size__ = 0x00080000 ; +define symbol __region_ROM_start__ = 0x00080000 ; +define symbol __region_ROM_end__ = __region_ROM_start__+__region_ROM_size__-1 ; + +export symbol __region_ROM_size__ ; +export symbol __region_ROM_start__ ; +export symbol __region_ROM_end__ ; + +/*-Sizes-*/ +define symbol __size_cstack__ = 0x1000 ; +define symbol __size_heap__ = 0x1000 ; + +/* Size of the IRQ Stack (Main Stack).*/ +define symbol __ICFEDIT_size_irqstack__ = 0x1000 ; + +define memory mem with size = 4G ; +define region RAM_region = mem:[from __region_RAM_start__ to __region_RAM_end__]; +define region ROM_region = mem:[from __region_ROM_start__ to __region_ROM_end__]; + +define block CSTACK with alignment = 8, size = __size_cstack__ {section CSTACK}; +define block IRQSTACK with alignment = 8, size = __ICFEDIT_size_irqstack__ {}; +define block SYSHEAP with alignment = 8 {section SYSHEAP}; +define block DATABSS with alignment = 8 {readwrite, zeroinit}; + +initialize by copy { readwrite }; +do not initialize { section .noinit }; + +keep { section .vtable }; + +place at start of ROM_region {section .vtable}; +place in ROM_region {readonly}; +place at start of RAM_region {block IRQSTACK}; +place in RAM_region {block DATABSS}; +place in RAM_region {block SYSHEAP}; +place at end of RAM_region {block CSTACK}; +