This is an automated email from the ASF dual-hosted git repository. kasjer pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/mynewt-core.git
commit dd1f6b9d75ec99d474f2ffe2197ceca97f9395d9 Author: Jerzy Kasenberg <[email protected]> AuthorDate: Wed Oct 14 14:05:59 2026 +0200 mcu/stm32f7: Initialize MPU from link table Regions declared with MPU_ARM_V7_REGION() were never loaded to MPU since nothing called arm_mpu_init(). Call it in SystemClock_Config() before caches are enabled. arm_mpu_init() does nothing when no region is declared. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Jerzy Kasenberg <[email protected]> --- hw/mcu/stm/stm32f7xx/src/clock_stm32f7xx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hw/mcu/stm/stm32f7xx/src/clock_stm32f7xx.c b/hw/mcu/stm/stm32f7xx/src/clock_stm32f7xx.c index 6a6260543..116184726 100644 --- a/hw/mcu/stm/stm32f7xx/src/clock_stm32f7xx.c +++ b/hw/mcu/stm/stm32f7xx/src/clock_stm32f7xx.c @@ -26,6 +26,7 @@ #include "stm32f7xx_hal_pwr_ex.h" #include "stm32f7xx_hal.h" +#include <arm_mpu.h> #include <assert.h> /* @@ -67,6 +68,9 @@ SystemClock_Config(void) RCC_ClkInitTypeDef clk_init = {0}; HAL_StatusTypeDef status; + /* MPU regions declared with MPU_ARM_V7_REGION(), set before caches */ + arm_mpu_init(); + /* Enable the MCU instruction cache */ #if MYNEWT_VAL(STM32_ENABLE_ICACHE) SCB_EnableICache();
