summaryrefslogtreecommitdiff
path: root/at91lib
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-07-24 10:25:45 +0200
committerHarald Welte <laforge@gnumonks.org>2011-07-24 10:25:45 +0200
commit9bfac6e63150c1bd604dbb406e4ac26ffa9520b4 (patch)
tree569a76fdc3da8cbe415c4adf799236cdd9f03948 /at91lib
parentac87fed579cd3d0289bdc82a79f121fcb6968aff (diff)
modify flash-dfu.lds to actually accomodate DFU
This linker script will produce a binary that can be loaded using the sam7dfu bootloader in the SAM7
Diffstat (limited to 'at91lib')
-rw-r--r--at91lib/boards/at91sam7s-ek/at91sam7s256/flash-dfu.lds14
1 files changed, 8 insertions, 6 deletions
diff --git a/at91lib/boards/at91sam7s-ek/at91sam7s256/flash-dfu.lds b/at91lib/boards/at91sam7s-ek/at91sam7s256/flash-dfu.lds
index 97daed6..c228dcc 100644
--- a/at91lib/boards/at91sam7s-ek/at91sam7s256/flash-dfu.lds
+++ b/at91lib/boards/at91sam7s-ek/at91sam7s256/flash-dfu.lds
@@ -28,7 +28,7 @@
*/
/*------------------------------------------------------------------------------
- * Linker script for running in internal Flash on the AT91SAM7S256.
+ * Linker script for running in DFU Flash partion the AT91SAM7S256.
*----------------------------------------------------------------------------*/
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
@@ -37,13 +37,15 @@ ENTRY(entry)
MEMORY
{
- sram (W!RX) : ORIGIN = 0x200000, LENGTH = 0x10000
- flash (RX) : ORIGIN = 0x100000, LENGTH = 0x40000
+ /* adjusted for DFU partition */
+ sram (W!RX) : ORIGIN = 0x200028, LENGTH = (0x10000 - 0x28)
+ flash (RX) : ORIGIN = 0x104000, LENGTH = (0x40000 - 0x4000 - 0x400)
}
SECTIONS
-{
- .fixed :
+{
+ . = 0x000000000;
+ .fixed 0x00104000: AT ( 0x00000000 )
{
. = ALIGN(4);
_sfixed = .;
@@ -53,7 +55,7 @@ SECTIONS
_efixed = .;
} >flash
- .relocate : AT (_efixed)
+ .relocate 0x00200028: AT ( SIZEOF(.fixed) )
{
. = ALIGN(4);
_srelocate = .;
personal git repositories of Harald Welte. Your mileage may vary