aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/IAR
diff options
context:
space:
mode:
Diffstat (limited to 'os/ports/IAR')
-rw-r--r--os/ports/IAR/ARMCMx/chcore_v7m.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/os/ports/IAR/ARMCMx/chcore_v7m.h b/os/ports/IAR/ARMCMx/chcore_v7m.h
index ee077749c..8ebd45bda 100644
--- a/os/ports/IAR/ARMCMx/chcore_v7m.h
+++ b/os/ports/IAR/ARMCMx/chcore_v7m.h
@@ -66,6 +66,13 @@
#endif
#endif
+/**
+ * @brief NVIC VTOR initialization expression.
+ */
+#if !defined(CORTEX_VTOR_INIT) || defined(__DOXYGEN__)
+#define CORTEX_VTOR_INIT 0x00000000
+#endif
+
/*===========================================================================*/
/* Port derived parameters. */
/*===========================================================================*/
@@ -192,6 +199,7 @@ struct intctx {
* @brief Port-related initialization code.
*/
#define port_init() { \
+ SCB_VTOR = CORTEX_VTOR_INIT; \
SCB_AIRCR = AIRCR_VECTKEY | AIRCR_PRIGROUP(0); \
NVICSetSystemHandlerPriority(HANDLER_SVCALL, \
CORTEX_PRIORITY_MASK(CORTEX_PRIORITY_SVCALL)); \