From 261436d22bc93338e08e67956a47142e3b0d5086 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 31 Aug 2015 10:29:39 +0100 Subject: working copy of sdks dfu bootloader --- dfu_gcc_nrf51.ld | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 dfu_gcc_nrf51.ld (limited to 'dfu_gcc_nrf51.ld') diff --git a/dfu_gcc_nrf51.ld b/dfu_gcc_nrf51.ld new file mode 100644 index 0000000..cc067dd --- /dev/null +++ b/dfu_gcc_nrf51.ld @@ -0,0 +1,53 @@ +/* Linker script to configure memory regions. */ + +SEARCH_DIR(.) +GROUP(-lgcc -lc -lnosys) + +MEMORY +{ + /** Flash start address for the bootloader. This setting will also be stored in UICR to allow the + * MBR to init the bootloader when starting the system. This value must correspond to + * BOOTLOADER_REGION_START found in dfu_types.h. The system is prevented from starting up if + * those values do not match. The check is performed in main.c, see + * APP_ERROR_CHECK_BOOL(*((uint32_t *)NRF_UICR_BOOT_START_ADDRESS) == BOOTLOADER_REGION_START); + */ + FLASH (rx) : ORIGIN = 0x3C000, LENGTH = 0x3C00 + + /** RAM Region for bootloader. This setting is suitable when used with s110, s120, s130, s310. */ + RAM (rwx) : ORIGIN = 0x20002C00, LENGTH = 0x5380 + + /** Location of non initialized RAM. Non initialized RAM is used for exchanging bond information + * from application to bootloader when using buttonluss DFU OTA. + */ + NOINIT (rwx) : ORIGIN = 0x20007F80, LENGTH = 0x80 + + /** Location of bootloader setting in at the last flash page. */ + BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0003FC00, LENGTH = 0x0400 + + /** Location in UICR where bootloader start address is stored. */ + UICR_BOOTLOADER (r) : ORIGIN = 0x10001014, LENGTH = 0x04 +} + +SECTIONS +{ + /* Ensures the bootloader settings are placed at the last flash page. */ + .bootloaderSettings(NOLOAD) : + { + + } > BOOTLOADER_SETTINGS + + /* Ensures the Bootloader start address in flash is written to UICR when flashing the image. */ + .uicrBootStartAddress : + { + KEEP(*(.uicrBootStartAddress)) + } > UICR_BOOTLOADER + + /* No init RAM section in bootloader. Used for bond information exchange. */ + .noinit(NOLOAD) : + { + + } > NOINIT + /* other placements follow here... */ +} + +INCLUDE "sdk/toolchain/gcc/gcc_nrf51_common.ld" -- cgit v1.2.3