mirror of https://github.com/ARMmbed/mbed-os.git
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
parent
f79531414f
commit
6064ef30e9
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue