summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-20 10:57:18 +0000
committerlaforge <laforge@6dc7ffe9-61d6-0310-9af1-9938baff3ed1>2006-09-20 10:57:18 +0000
commit20b657d7d20508b2a5fedf2e7a59a30e3d9a2fa4 (patch)
tree0d18cf57daad7cf33eb6989ee76bf941e4cb43af
parent7b93a43784d19102b015f3f3537942c497036445 (diff)
- 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
-rw-r--r--firmware/link/AT91SAM7S128-ROM-sam7dfu-dfu.ld3
-rw-r--r--firmware/link/AT91SAM7S256-ROM-sam7dfu-dfu.ld3
-rw-r--r--firmware/src/start/Cstartup.S2
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
personal git repositories of Harald Welte. Your mileage may vary