X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm%2Faltos.ld;h=d218e992ad8aa5e835c951d94bd8b97e93e6cac1;hb=db7f17980c303e442f88c8a4168351dbc2c0b1a0;hp=f5a84f4c2c658931dd409351b4c1b8e1c1a90ec6;hpb=09633cac697e37d770b2b666ab20cab30628484f;p=fw%2Faltos diff --git a/src/stm/altos.ld b/src/stm/altos.ld index f5a84f4c..d218e992 100644 --- a/src/stm/altos.ld +++ b/src/stm/altos.ld @@ -17,7 +17,8 @@ MEMORY { rom (rx) : ORIGIN = 0x08000000, LENGTH = 128K - ram (!w) : ORIGIN = 0x20000000, LENGTH = 16K + ram (!w) : ORIGIN = 0x20000000, LENGTH = 15872 + stack (!w) : ORIGIN = 0x20003e00, LENGTH = 512 } INCLUDE registers.ld @@ -25,18 +26,22 @@ INCLUDE registers.ld EXTERN (stm_interrupt_vector) SECTIONS { - . = ORIGIN(rom); - /* * Rom contents */ - __text_start__ = .; - - .text : { + .text ORIGIN(rom) : { + __text_start__ = .; *(.interrupt) /* Interrupt vectors */ + + . = ORIGIN(rom) + 0x100; + + ao_romconfig.o(.romconfig*) + ao_product.o(.romconfig*) + *(.text*) /* Executable code */ *(.rodata*) /* Constants */ + } > rom .ARM.exidx : { @@ -44,12 +49,10 @@ SECTIONS { __text_end__ = .; } > rom - . = ORIGIN(ram); - __data_start__ = .; - /* Data -- relocated to RAM, but written to ROM */ - .data : AT (ADDR(.ARM.exidx) + SIZEOF (.ARM.exidx)) { + .data ORIGIN(ram) : AT (ADDR(.ARM.exidx) + SIZEOF (.ARM.exidx)) { + __data_start__ = .; *(.data) /* initialized data */ __data_end__ = .; __bss_start__ = .; @@ -61,9 +64,9 @@ SECTIONS { __bss_end__ = .; } >ram - PROVIDE(__stack__ = ORIGIN(ram) + LENGTH(ram)); PROVIDE(end = .); + PROVIDE(__stack__ = ORIGIN(stack) + LENGTH(stack)); } ENTRY(start);