aboutsummaryrefslogtreecommitdiffstats
path: root/os/common/ports/ARMCMx/chcore_v7m.c
diff options
context:
space:
mode:
Diffstat (limited to 'os/common/ports/ARMCMx/chcore_v7m.c')
-rw-r--r--os/common/ports/ARMCMx/chcore_v7m.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/os/common/ports/ARMCMx/chcore_v7m.c b/os/common/ports/ARMCMx/chcore_v7m.c
index a40b2c005..8fbe02591 100644
--- a/os/common/ports/ARMCMx/chcore_v7m.c
+++ b/os/common/ports/ARMCMx/chcore_v7m.c
@@ -116,6 +116,19 @@ void PendSV_Handler(void) {
/* Module exported functions. */
/*===========================================================================*/
+#if (CH_DBG_ENABLE_STACK_CHECK == TRUE) || \
+ (PORT_ENABLE_GUARD_PAGES == TRUE) || \
+ defined(__DOXYGEN__)
+/**
+ * @brief Setting up MPU region for the current thread.
+ */
+void _port_set_region(void) {
+
+ mpuSetRegionAddress(PORT_USE_MPU_REGION,
+ chThdGetSelfX()->wabase);
+}
+#endif
+
/**
* @brief Exception exit redirection to _port_switch_from_isr().
*/