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 ed63b9fbfb6656a5c466a97318ee91072698a214
Author: Jerzy Kasenberg <[email protected]>
AuthorDate: Wed Oct 14 14:05:59 2026 +0200

    mcu/stm32h7: 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 at the beginning of
    hal_system_init() 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/stm32h7xx/src/hal_system_init.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hw/mcu/stm/stm32h7xx/src/hal_system_init.c 
b/hw/mcu/stm/stm32h7xx/src/hal_system_init.c
index a0309c99a..9f816a06a 100644
--- a/hw/mcu/stm/stm32h7xx/src/hal_system_init.c
+++ b/hw/mcu/stm/stm32h7xx/src/hal_system_init.c
@@ -21,12 +21,16 @@
 #include "mynewt_cm.h"
 #include "mcu/stm32_hal.h"
 #include <hal/hal_system.h>
+#include <arm_mpu.h>
 
 void SystemClock_Config(void);
 
 void
 hal_system_init(void)
 {
+    /* MPU regions declared with MPU_ARM_V7_REGION(), set before caches */
+    arm_mpu_init();
+
     /* Configure System Clock */
     SystemClock_Config();
 

Reply via email to