From 2a968d4d35c2ada05a015d352f7271b075e5d74d Mon Sep 17 00:00:00 2001 From: RFulchiero Date: Wed, 14 Nov 2018 14:51:10 -0600 Subject: [PATCH] Revert "NRF52: Fix vector table" This reverts commit 3d2fa535a71b7bad08c6a91a31d74f4492c8948c. This was a breaking change for the "MBR" and "NONE" builds. After testing it was also determined that copying the vector table a second time wasn't required for the "FULL" build. --- .../TARGET_NRF5x/TARGET_NRF52/reloc_vector_table.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/reloc_vector_table.c b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/reloc_vector_table.c index b1a5d442d1..619c8145b5 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/reloc_vector_table.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/reloc_vector_table.c @@ -47,7 +47,15 @@ #include "nrf_dfu_mbr.h" #endif -uint32_t nrf_dispatch_vector[NVIC_NUM_VECTORS]; +#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 extern uint32_t __Vectors[]; @@ -105,6 +113,7 @@ void nrf_reloc_vector_table(void) #endif } +#if (STDIO_UART_RTS != NC) void mbed_sdk_init(void) { if (STDIO_UART_RTS != NC) { @@ -114,3 +123,4 @@ void mbed_sdk_init(void) gpio_write(&rts, 0); } } +#endif