From 20b657d7d20508b2a5fedf2e7a59a30e3d9a2fa4 Mon Sep 17 00:00:00 2001 From: laforge Date: Wed, 20 Sep 2006 10:57:18 +0000 Subject: - fix linker scripts and Cstartup.S to correctly relocate shared data git-svn-id: https://svn.openpcd.org:2342/trunk@207 6dc7ffe9-61d6-0310-9af1-9938baff3ed1 --- firmware/link/AT91SAM7S128-ROM-sam7dfu-dfu.ld | 3 ++- firmware/link/AT91SAM7S256-ROM-sam7dfu-dfu.ld | 3 ++- firmware/src/start/Cstartup.S | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/firmware/link/AT91SAM7S128-ROM-sam7dfu-dfu.ld b/firmware/link/AT91SAM7S128-ROM-sam7dfu-dfu.ld index a0f7c3e..dfcfff1 100644 --- a/firmware/link/AT91SAM7S128-ROM-sam7dfu-dfu.ld +++ b/firmware/link/AT91SAM7S128-ROM-sam7dfu-dfu.ld @@ -31,7 +31,8 @@ SECTIONS . = ALIGN(4); } >DATA - _edata_shared = LOADADDR(.data.shared) + SIZEOF(.data.shared); + _edata_shared = . ; + _data_flash = LOADADDR(.data.shared) + SIZEOF(.data.shared); /* 0x00200000 ... */ .data (0x00200000 + SIZEOF(.text)): AT diff --git a/firmware/link/AT91SAM7S256-ROM-sam7dfu-dfu.ld b/firmware/link/AT91SAM7S256-ROM-sam7dfu-dfu.ld index a151de8..7f133da 100644 --- a/firmware/link/AT91SAM7S256-ROM-sam7dfu-dfu.ld +++ b/firmware/link/AT91SAM7S256-ROM-sam7dfu-dfu.ld @@ -31,7 +31,8 @@ SECTIONS . = ALIGN(4); } >DATA - _edata_shared = LOADADDR(.data.shared) + SIZEOF(.data.shared); + _edata_shared = . ; + _data_flash = LOADADDR(.data.shared) + SIZEOF(.data.shared); /* 0x00200000 ... */ .data (0x00200000 + SIZEOF(.text)): AT ( LOADADDR(.text) + SIZEOF(.text) + SIZEOF(.data.shared)) { diff --git a/firmware/src/start/Cstartup.S b/firmware/src/start/Cstartup.S index f1c341e..6861750 100644 --- a/firmware/src/start/Cstartup.S +++ b/firmware/src/start/Cstartup.S @@ -352,7 +352,7 @@ LoopZI: CMP R1, R2 _reloc_dfu: /* Relocate DFU .data section (Copy from ROM to RAM) */ - LDR R1, =_edata_shared + LDR R1, =_data_flash LDR R2, =_data LDR R3, =_edata LoopRel: CMP R2, R3 -- cgit v1.2.3