X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fstm%2Faltos-loader.ld;h=50a425c75309f2cf203bf25d200f50e2706cbcfe;hb=56a7cbbf51f5c9ebbfe17d1cc30ed807572af3cc;hp=2d71b4eeeb070511e5a47a01b226f2ed2552687f;hpb=c9c35b100c3fcae661501d2bf89eedc7fceb2e1c;p=fw%2Faltos diff --git a/src/stm/altos-loader.ld b/src/stm/altos-loader.ld index 2d71b4ee..50a425c7 100644 --- a/src/stm/altos-loader.ld +++ b/src/stm/altos-loader.ld @@ -16,8 +16,8 @@ */ MEMORY { - rom (rx) : ORIGIN = 0x08000000, LENGTH = 8K - ram (!w) : ORIGIN = 0x20000000, LENGTH = 16K + rom : ORIGIN = 0x08000000, LENGTH = 8K + ram : ORIGIN = 0x20000000, LENGTH = 16K } INCLUDE registers.ld @@ -29,7 +29,7 @@ SECTIONS { * Rom contents */ - .text ORIGIN(rom) : { + .text : { __text_start__ = .; *(.interrupt) /* Interrupt vectors */ @@ -38,26 +38,35 @@ SECTIONS { ao_romconfig.o(.romconfig*) ao_product.o(.romconfig*) - *(.text*) /* Executable code */ - *(.rodata*) /* Constants */ + *(.text) /* Executable code */ + *(.rodata) /* Constants */ } > rom .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) - __text_end__ = .; } > rom + __text_end__ = .; + + /* Functions placed in RAM (required for flashing) */ + .textram : { + __text_ram_start = .; + __data_start__ = .; + *(.text.ram) + . = ALIGN(4); + } >ram AT>rom + __text_ram_end = .; /* Data -- relocated to RAM, but written to ROM */ - .data ORIGIN(ram) : AT (ADDR(.ARM.exidx) + SIZEOF (.ARM.exidx)) { - __data_start__ = .; + .data : { *(.data) /* initialized data */ - __data_end__ = .; - __bss_start__ = .; - } >ram + . = ALIGN (4); + } >ram AT>rom + __data_end__ = .; .bss : { + __bss_start__ = .; *(.bss) *(COMMON) __bss_end__ = .;