MEMORY { flash : org = 0x08000000, len = 256k sram1 : org = 0x20000000, len = 48k sram2 : org = 0x10000000, len = 16k } SECTIONS { /* This is where the code goes. */ . = ORIGIN(flash); .text ALIGN(0x04) : { . = ALIGN(0x04); VECTORS_START = .; *(.vectors); /* All .vector sections go here. */ VECTORS_END = .; TEXT_START = .; *(.text); /* All .text sections go here. */ TEXT_END = .; /* Start the init sections. The inits sections are text sections which are * executed in order during startup. */ INITS_START = .; INIT_0_START = .; *(.init0); INIT_0_END = .; INIT_1_START = .; *(.init1); INIT_1_END = .; INIT_2_START = .; *(.init2); INIT_2_END = .; INIT_3_START = .; *(.init3); INIT_3_END = .; INIT_4_START = .; *(.init4); INIT_4_END = .; INIT_5_START = .; *(.init5); INIT_5_END = .; INIT_6_START = .; *(.init6); INIT_6_END = .; INIT_7_START = .; *(.init7); INIT_7_END = .; INITS_END = .; FLASH_STOP = .; } >flash AT >flash /* Data segment as defined in the flash. */ DATA_VALUES_IN_FLASH = LOADADDR(.data); .data : ALIGN(0x04) { /* Data segment where it will be in memory. */ . = ALIGN(0x04); DATA_SEGMENT_START = .; *(.data); DATA_SEGMENT_STOP = .; /* Align by 4 so we can optimize the copier to use uint32's. */ . = ALIGN(0x04); *(.noinit); } >sram2 AT>flash .bss : ALIGN(0x04){ . = ALIGN(0x04); BSS_START = .; *(.bss); . = ALIGN(0x04); BSS_END = .; } > sram2 .heap : ALIGN(0x04) { HEAP_START = .; HEAP_STOP = ABSOLUTE(ORIGIN(sram1) + LENGTH(sram1)); } > sram1 }