aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-14 17:59:02 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-11-14 17:59:02 +0000
commit375244fdc49a7dfbe592914bc28fb24312386771 (patch)
treeb734bddd7435113d7ca207eb811dfdeba3ee3591
parente1f35463ed863f65de82314d0ac06118d095fa7e (diff)
downloadChibiOS-375244fdc49a7dfbe592914bc28fb24312386771.tar.gz
ChibiOS-375244fdc49a7dfbe592914bc28fb24312386771.tar.bz2
ChibiOS-375244fdc49a7dfbe592914bc28fb24312386771.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3492 35acf78f-673a-0410-8e92-d51de3d6d3f4
-rw-r--r--os/ports/GCC/ARMCMx/chcore_v7m.h8
-rw-r--r--os/ports/IAR/ARMCMx/chcore_v7m.h8
-rw-r--r--os/ports/RVCT/ARMCMx/chcore_v7m.h8
-rw-r--r--readme.txt3
4 files changed, 27 insertions, 0 deletions
diff --git a/os/ports/GCC/ARMCMx/chcore_v7m.h b/os/ports/GCC/ARMCMx/chcore_v7m.h
index a2427c27e..96149cae9 100644
--- a/os/ports/GCC/ARMCMx/chcore_v7m.h
+++ b/os/ports/GCC/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)); \
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)); \
diff --git a/os/ports/RVCT/ARMCMx/chcore_v7m.h b/os/ports/RVCT/ARMCMx/chcore_v7m.h
index ef04fa15e..b4181d517 100644
--- a/os/ports/RVCT/ARMCMx/chcore_v7m.h
+++ b/os/ports/RVCT/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)); \
diff --git a/readme.txt b/readme.txt
index 3adb886b9..1c1bc7808 100644
--- a/readme.txt
+++ b/readme.txt
@@ -84,6 +84,9 @@
(backported to 2.2.8).
- FIX: Fixed broken TIM8 support in STM32 PWM driver (bug 3418620).
- FIX: Fixed halconf.h file corrupted in some STM32 demos (bug 3418626).
+- NEW: Added initialization of the NVIC VTOR register to all Cortex-Mx (v7M)
+ ports. Also added a port option CORTEX_VTOR_INIT to enforce a different
+ default value into the register.
- NEW: Removed the warning about the "untested M4 platform", now it is
tested and officially supported.
- NEW: Reorganized the STM32F1xx hal_lld_xxx.h files in order to distribute