reserve RAM for DFU magic

this changes the linker script so the first word (smallest unit
since the data needs to be 4 baty aligned) is not reserved for
the RAM section.
this allows the application to write any data at this address
without the rest of the code messing with the content.
since the SRAM is preserved after reset, this allows to share
data between firmware.
in particular it allows the application to tell the bootloader it
should start the flashing procedure.
this is already implemented in the osmo-asf4-dfu DFU bootloader.
if the application wants to switch to the DFU bootloader, write
the DFU magic 0x44465521 (DFU!) at the beginning of RAM at address
(uint32_t*)HSRAM_ADDR, and perform a system reset.

Change-Id: Ibafd08429b05fd3cab6af060904201db83186a4e
diff --git a/sysmoOCTSIM/gcc/gcc/same54n19a_dfu.ld b/sysmoOCTSIM/gcc/gcc/same54n19a_dfu.ld
index 7d76cc2..17fc417 100644
--- a/sysmoOCTSIM/gcc/gcc/same54n19a_dfu.ld
+++ b/sysmoOCTSIM/gcc/gcc/same54n19a_dfu.ld
@@ -36,7 +36,8 @@
 MEMORY
 {
   rom      (rx)  : ORIGIN = 0x00000000 + 16K, LENGTH = 0x00080000 - 16K
-  ram      (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000
+  /* The first word of the RAM is used for the DFU magic */
+  ram      (rwx) : ORIGIN = 0x20000000 + 4, LENGTH = 0x00030000 - 4
   bkupram  (rwx) : ORIGIN = 0x47000000, LENGTH = 0x00002000
   qspi     (rwx) : ORIGIN = 0x04000000, LENGTH = 0x01000000
 }
diff --git a/sysmoOCTSIM/gcc/gcc/same54n19a_flash.ld b/sysmoOCTSIM/gcc/gcc/same54n19a_flash.ld
index 33b8ed9..ce30971 100644
--- a/sysmoOCTSIM/gcc/gcc/same54n19a_flash.ld
+++ b/sysmoOCTSIM/gcc/gcc/same54n19a_flash.ld
@@ -36,7 +36,8 @@
 MEMORY

 {

   rom      (rx)  : ORIGIN = 0x00000000, LENGTH = 0x00080000

-  ram      (rwx) : ORIGIN = 0x20000000, LENGTH = 0x00030000

+  /* The first word of the RAM is used for the DFU magic */

+  ram      (rwx) : ORIGIN = 0x20000000 + 4, LENGTH = 0x00030000 - 4

   bkupram  (rwx) : ORIGIN = 0x47000000, LENGTH = 0x00002000

   qspi     (rwx) : ORIGIN = 0x04000000, LENGTH = 0x01000000

 }