NRF52: Fix vector table

Ensure that vector table gets initialized properly. The table that we
initialize in startup_nrf52840.S gets wiped out as the section is
declared as noinit. Fix this by implementing the weak function mbed_sdk_init
that inits the vector table.
pull/10652/head
Naveen Kaje 2018-09-26 15:26:45 -05:00 committed by desmond.chen
parent f79531414f
commit 6064ef30e9
1 changed files with 1 additions and 10 deletions

View File

@ -47,15 +47,7 @@
#include "nrf_dfu_mbr.h"
#endif
#if defined(__CC_ARM) || (defined(__ARMCC_VERSION) && (__ARMCC_VERSION >= 6010050))
__attribute__ ((section(".bss.nvictable"),zero_init))
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS];
#elif defined(__GNUC__)
__attribute__ ((section(".nvictable")))
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS];
#elif defined(__ICCARM__)
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS] @ ".nvictable";
#endif
uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS];
extern uint32_t __Vectors[];
@ -113,7 +105,6 @@ void nrf_reloc_vector_table(void)
#endif
}
void mbed_sdk_init(void)
{
if (STDIO_UART_RTS != NC) {