2018-08-07 14:49:07 +00:00
|
|
|
/* Linker script to configure memory regions. */
|
|
|
|
|
|
|
|
SEARCH_DIR(.)
|
|
|
|
GROUP(-lgcc -lc -lnosys)
|
|
|
|
|
|
|
|
MEMORY
|
|
|
|
{
|
2020-04-18 14:37:06 +00:00
|
|
|
/** 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 = 0x7a000, LENGTH = 0x7E000-0x7a000 /* 40 KB */
|
2018-08-07 14:49:07 +00:00
|
|
|
|
2019-11-29 04:44:51 +00:00
|
|
|
/** Location of mbr params page in flash. */
|
|
|
|
MBR_PARAMS_PAGE (rw) : ORIGIN = 0x0007E000, LENGTH = 0x1000
|
2020-04-18 14:37:06 +00:00
|
|
|
|
2019-11-29 04:44:51 +00:00
|
|
|
/** Location of bootloader setting in flash. */
|
|
|
|
BOOTLOADER_SETTINGS (rw) : ORIGIN = 0x0007F000, LENGTH = 0x1000
|
2020-04-18 14:37:06 +00:00
|
|
|
|
2018-08-07 14:49:07 +00:00
|
|
|
/** RAM Region for bootloader. */
|
2019-11-29 04:44:51 +00:00
|
|
|
/* Avoid conflict with NOINIT for OTA bond sharing */
|
|
|
|
RAM (rwx) : ORIGIN = 0x20008000, LENGTH = 0x20020000-0x20008000
|
2018-08-30 19:25:47 +00:00
|
|
|
|
|
|
|
/* Location for double reset detection, no init */
|
|
|
|
DBL_RESET (rwx) : ORIGIN = 0x20007F7C, LENGTH = 0x04
|
2018-08-07 14:49:07 +00:00
|
|
|
|
2020-04-18 14:37:06 +00:00
|
|
|
/** Location of non initialized RAM. Non initialized RAM is used for
|
|
|
|
exchanging bond information * from application to bootloader when using
|
|
|
|
buttonless DFU OTA. */ NOINIT (rwx) : ORIGIN = 0x20007F80, LENGTH = 0x80
|
2018-08-07 14:49:07 +00:00
|
|
|
|
|
|
|
/** Location in UICR where bootloader start address is stored. */
|
|
|
|
UICR_BOOTLOADER (r) : ORIGIN = 0x10001014, LENGTH = 0x04
|
2020-04-18 14:37:06 +00:00
|
|
|
|
2018-08-07 14:49:07 +00:00
|
|
|
/** Location in UICR where mbr params page address is stored. */
|
|
|
|
UICR_MBR_PARAM_PAGE(r) : ORIGIN = 0x10001018, LENGTH = 0x04
|
|
|
|
}
|
|
|
|
|
|
|
|
SECTIONS
|
|
|
|
{
|
|
|
|
.fs_data_out ALIGN(4):
|
|
|
|
{
|
|
|
|
PROVIDE( __start_fs_data = .);
|
|
|
|
KEEP(*(fs_data))
|
|
|
|
PROVIDE( __stop_fs_data = .);
|
|
|
|
} = 0
|
|
|
|
|
|
|
|
/* Place the bootloader settings page in flash. */
|
|
|
|
.bootloaderSettings(NOLOAD) :
|
|
|
|
{
|
2020-04-18 14:37:06 +00:00
|
|
|
|
2018-08-07 14:49:07 +00:00
|
|
|
} > BOOTLOADER_SETTINGS
|
|
|
|
|
|
|
|
/* Write the bootloader address in UICR. */
|
2020-04-18 14:37:06 +00:00
|
|
|
.uicrBootStartAddress :
|
2018-08-07 14:49:07 +00:00
|
|
|
{
|
|
|
|
KEEP(*(.uicrBootStartAddress))
|
|
|
|
} > UICR_BOOTLOADER
|
2020-04-18 14:37:06 +00:00
|
|
|
|
2018-08-07 14:49:07 +00:00
|
|
|
/* Place the mbr params page in flash. */
|
|
|
|
.mbrParamsPage(NOLOAD) :
|
|
|
|
{
|
2020-04-18 14:37:06 +00:00
|
|
|
|
2018-08-07 14:49:07 +00:00
|
|
|
} > MBR_PARAMS_PAGE
|
2020-04-18 14:37:06 +00:00
|
|
|
|
2018-08-07 14:49:07 +00:00
|
|
|
/* Write the bootloader address in UICR. */
|
|
|
|
.uicrMbrParamsPageAddress :
|
|
|
|
{
|
|
|
|
KEEP(*(.uicrMbrParamsPageAddress))
|
|
|
|
} > UICR_MBR_PARAM_PAGE
|
2019-11-29 04:44:51 +00:00
|
|
|
|
2018-08-30 19:25:47 +00:00
|
|
|
.dbl_reset(NOLOAD) :
|
|
|
|
{
|
|
|
|
|
2019-11-29 04:44:51 +00:00
|
|
|
} > DBL_RESET
|
2018-08-07 14:49:07 +00:00
|
|
|
|
|
|
|
/* No init RAM section in bootloader. Used for bond information exchange. */
|
|
|
|
.noinit(NOLOAD) :
|
|
|
|
{
|
|
|
|
|
|
|
|
} > NOINIT
|
2019-11-29 04:44:51 +00:00
|
|
|
|
2018-08-07 14:49:07 +00:00
|
|
|
/* other placements follow here... */
|
|
|
|
}
|
|
|
|
|
|
|
|
INCLUDE "nrf_common.ld"
|