mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Revision:
163:74e0ce7f98e8
Parent:
149:156823d33999
Child:
167:e84263d55307
--- a/targets/TARGET_NUVOTON/TARGET_M451/device/cmsis_nvic.h	Wed Apr 12 16:21:43 2017 +0100
+++ b/targets/TARGET_NUVOTON/TARGET_M451/device/cmsis_nvic.h	Fri Apr 28 14:04:18 2017 +0100
@@ -32,8 +32,18 @@
 #   define NVIC_RAM_VECTOR_ADDRESS  ((uint32_t) &__start_vector_table__)
 #endif
 
-
-#define NVIC_FLASH_VECTOR_ADDRESS 0
+#if defined(__CC_ARM)
+    extern uint32_t Load$$LR$$LR_IROM1$$Base[];
+    #define NVIC_FLASH_VECTOR_ADDRESS   ((uint32_t)Load$$LR$$LR_IROM1$$Base)
+#elif defined(__ICCARM__)
+    #pragma section=".intvec"
+    #define NVIC_FLASH_VECTOR_ADDRESS   ((uint32_t)__section_begin(".intvec"))
+#elif defined(__GNUC__)
+      extern uint32_t __vector_table;
+      #define NVIC_FLASH_VECTOR_ADDRESS   ((uint32_t)&__vector_table)
+#else
+    #error "Flash vector address not set for this toolchain"
+#endif
 
 #ifdef __cplusplus
 extern "C" {