From 5d51fbc8cb51869a5100b01249bcc791ae9492a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20=C3=96hman?= Date: Wed, 30 Mar 2022 14:49:08 +0200 Subject: [PATCH] mpu: Support for 8 & 16 MB SRAM regions in Cortex M MPU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added support for 8 MB MPU regions for SRAM sizes between 4 and 8 MB, and 16 MB MPU regions for SRAM sizes between 8 and 16 MB. Signed-off-by: Johan Öhman --- soc/arm/common/cortex_m/arm_mpu_mem_cfg.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/soc/arm/common/cortex_m/arm_mpu_mem_cfg.h b/soc/arm/common/cortex_m/arm_mpu_mem_cfg.h index dbcaa553302..eafd78e8d90 100644 --- a/soc/arm/common/cortex_m/arm_mpu_mem_cfg.h +++ b/soc/arm/common/cortex_m/arm_mpu_mem_cfg.h @@ -54,6 +54,10 @@ #define REGION_SRAM_SIZE REGION_2M #elif CONFIG_SRAM_SIZE <= 4096 #define REGION_SRAM_SIZE REGION_4M +#elif CONFIG_SRAM_SIZE <= 8192 +#define REGION_SRAM_SIZE REGION_8M +#elif CONFIG_SRAM_SIZE <= 16384 +#define REGION_SRAM_SIZE REGION_16M #elif CONFIG_SRAM_SIZE == 32768 #define REGION_SRAM_SIZE REGION_32M #elif CONFIG_SRAM_SIZE == 65536