diff --git a/include/arch/arm/cortex_m/mpu/nxp_mpu.h b/include/arch/arm/cortex_m/mpu/nxp_mpu.h index 496fdef1af3..6607d59c27a 100644 --- a/include/arch/arm/cortex_m/mpu/nxp_mpu.h +++ b/include/arch/arm/cortex_m/mpu/nxp_mpu.h @@ -146,7 +146,7 @@ struct nxp_mpu_config { /* Number of regions */ u32_t num_regions; /* Regions */ - struct nxp_mpu_region *mpu_regions; + const struct nxp_mpu_region *mpu_regions; /* SRAM Region */ u32_t sram_region; }; @@ -159,6 +159,6 @@ struct nxp_mpu_config { * for Thread Stack, Stack Guards, etc.) are programmed during runtime, thus, * not kept here. */ -extern struct nxp_mpu_config mpu_config; +extern const struct nxp_mpu_config mpu_config; #endif /* ZEPHYR_INCLUDE_ARCH_ARM_CORTEX_M_MPU_NXP_MPU_H_ */ diff --git a/soc/arm/nxp_kinetis/k6x/nxp_mpu_regions.c b/soc/arm/nxp_kinetis/k6x/nxp_mpu_regions.c index 6578d9fef02..e4907c243c2 100644 --- a/soc/arm/nxp_kinetis/k6x/nxp_mpu_regions.c +++ b/soc/arm/nxp_kinetis/k6x/nxp_mpu_regions.c @@ -6,7 +6,7 @@ #include #include -static struct nxp_mpu_region mpu_regions[] = { +static const struct nxp_mpu_region mpu_regions[] = { /* Region 0 */ MPU_REGION_ENTRY("DEBUGGER_0", 0, @@ -48,7 +48,7 @@ static struct nxp_mpu_region mpu_regions[] = { REGION_RAM_ATTR), }; -struct nxp_mpu_config mpu_config = { +const struct nxp_mpu_config mpu_config = { .num_regions = ARRAY_SIZE(mpu_regions), .mpu_regions = mpu_regions, .sram_region = 4,