From d7fdcefbd7565e59aaaf2dea99bee8e0157ff1d7 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sun, 7 Jul 2013 18:22:56 -0400 Subject: [PATCH] lpc43xx: Fix rom_to_ram linker script It was missing some definitions compared to the libopencm3_lpc43xx.ld. --- lib/lpc43xx/m4/libopencm3_lpc43xx_rom_to_ram.ld | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/lpc43xx/m4/libopencm3_lpc43xx_rom_to_ram.ld b/lib/lpc43xx/m4/libopencm3_lpc43xx_rom_to_ram.ld index 461ed45c..e50040eb 100644 --- a/lib/lpc43xx/m4/libopencm3_lpc43xx_rom_to_ram.ld +++ b/lib/lpc43xx/m4/libopencm3_lpc43xx_rom_to_ram.ld @@ -74,7 +74,7 @@ SECTIONS .ARM.extab : { *(.ARM.extab*) } >rom - + /* exception index - required due to libgcc.a issuing /0 exceptions */ .ARM.exidx : { __exidx_start = .; @@ -87,12 +87,15 @@ SECTIONS _etext_ram = (. - ORIGIN(rom)) + ORIGIN(ram_local1); _etext_rom = (. - ORIGIN(rom)) + ORIGIN(rom_flash); + . = ORIGIN(ram_local2); + .data : { _data = .; *(.data*) /* Read-write initialized data */ . = ALIGN(4); _edata = .; } >ram_local2 AT >rom + _data_loadaddr = LOADADDR(.data); _data_rom = LOADADDR (.data) + ORIGIN(rom_flash); _edata_rom = _data_rom + SIZEOF (.data);