NRF52: add a separate .nvictable section and allow .noinit to be used by the application

pull/7145/head
Bernhard Schuster 2018-06-06 14:04:15 +02:00
parent 4fcaa56b77
commit 86ce955d96
3 changed files with 20 additions and 6 deletions

View File

@ -199,13 +199,20 @@ SECTIONS
__edata = .;
.nvictable (NOLOAD) :
{
PROVIDE(__start_nvictable = .);
KEEP(*(.nvictable))
PROVIDE(__stop_nvictable = .);
} > RAM_NVIC
.noinit (NOLOAD) :
{
PROVIDE(__start_noinit = .);
KEEP(*(.noinit))
PROVIDE(__stop_noinit = .);
} > RAM_NVIC
} > RAM
.bss :
{
. = ALIGN(4);

View File

@ -198,12 +198,19 @@ SECTIONS
__edata = .;
.nvictable (NOLOAD) :
{
PROVIDE(__start_nvictable = .);
KEEP(*(.nvictable))
PROVIDE(__stop_nvictable = .);
} > RAM_NVIC
.noinit (NOLOAD) :
{
PROVIDE(__start_noinit = .);
KEEP(*(.noinit))
PROVIDE(__stop_noinit = .);
} > RAM_NVIC
} > RAM
.bss :
{

View File

@ -46,13 +46,13 @@
#endif
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
__attribute__ ((section(".bss.noinit"),zero_init))
__attribute__ ((section(".bss.nvictable"),zero_init))
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS];
#elif defined(__GNUC__)
__attribute__ ((section(".noinit")))
__attribute__ ((section(".nvictable")))
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS];
#elif defined(__ICCARM__)
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS] @ ".noinit";
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS] @ ".nvictable";
#endif
extern uint32_t __Vectors[];