tools: Don't try to erase and program the second flash sector.
[gps-watch.git] / src / bootloader / bootloader.ld
index 574442906c79e17536acfc48b35e445b480d6217..55b605750956013061153ecfbba244349ea1b358 100644 (file)
@@ -7,8 +7,11 @@
 /* Linker script to configure memory regions. */
 MEMORY
 {
-  FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 0x40000   /* 256k */
-  RAM (rwx)  : ORIGIN = 0x20000000, LENGTH = 0x08000   /*  32k */
+  FLASH (rx)
+    : ORIGIN = 0x00008000, LENGTH = 0x38000
+
+  RAM (rwx)
+    : ORIGIN = 0x1fffe000, LENGTH = 0x08000
 }
 
 /* Library configurations */
@@ -22,10 +25,6 @@ GROUP(libgcc.a libc.a libm.a libnosys.a)
  * It defines following symbols, which code can use without definition:
  *   __exidx_start
  *   __exidx_end
- *   __copy_table_start__
- *   __copy_table_end__
- *   __zero_table_start__
- *   __zero_table_end__
  *   __etext
  *   __data_start__
  *   __preinit_array_start
@@ -43,8 +42,6 @@ GROUP(libgcc.a libc.a libm.a libnosys.a)
  *   __StackLimit
  *   __StackTop
  *   __stack
- *   __Vectors_End
- *   __Vectors_Size
  */
 ENTRY(Reset_Handler)
 
@@ -53,8 +50,6 @@ SECTIONS
        .text :
        {
                KEEP(*(.vectors))
-               __Vectors_End = .;
-               __Vectors_Size = __Vectors_End - __Vectors;
                __end__ = .;
 
                *(.text*)
@@ -93,40 +88,6 @@ SECTIONS
        } > FLASH
        __exidx_end = .;
 
-       /* To copy multiple ROM to RAM sections,
-        * uncomment .copy.table section and,
-        * define __STARTUP_COPY_MULTIPLE in startup_ARMCMx.S */
-       /*
-       .copy.table :
-       {
-               . = ALIGN(4);
-               __copy_table_start__ = .;
-               LONG (__etext)
-               LONG (__data_start__)
-               LONG (__data_end__ - __data_start__)
-               LONG (__etext2)
-               LONG (__data2_start__)
-               LONG (__data2_end__ - __data2_start__)
-               __copy_table_end__ = .;
-       } > FLASH
-       */
-
-       /* To clear multiple BSS sections,
-        * uncomment .zero.table section and,
-        * define __STARTUP_CLEAR_BSS_MULTIPLE in startup_ARMCMx.S */
-       /*
-       .zero.table :
-       {
-               . = ALIGN(4);
-               __zero_table_start__ = .;
-               LONG (__bss_start__)
-               LONG (__bss_end__ - __bss_start__)
-               LONG (__bss2_start__)
-               LONG (__bss2_end__ - __bss2_start__)
-               __zero_table_end__ = .;
-       } > FLASH
-       */
-
        __etext = .;
 
        .data : AT (__etext)