Skip to content

Commit

Permalink
soc: nxp: imxrt: user defined mpu regions
Browse files Browse the repository at this point in the history
Option NXP_IMX_RT_USER_MPU_REGIONS exclude soc file mpu_regions.c
and allow user define custom mpu_regions in custom file.
Fixes #70920

Signed-off-by: Grixa Yrev <[email protected]>
  • Loading branch information
GrixaYrev committed Jul 8, 2024
1 parent bbf5183 commit 95f41e6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion soc/nxp/imxrt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ if(CONFIG_SOC_SERIES_IMXRT10XX OR CONFIG_SOC_SERIES_IMXRT11XX)
if(CONFIG_EXTERNAL_MEM_CONFIG_DATA)
set(boot_hdr_xmcd_data_section ".boot_hdr.xmcd_data")
endif()
zephyr_sources(mpu_regions.c)
if(NOT CONFIG_NXP_IMX_RT_USER_MPU_REGIONS)
zephyr_sources(mpu_regions.c)
endif()
zephyr_linker_section_configure(
SECTION .rom_start
INPUT ".boot_hdr.conf"
Expand Down
7 changes: 7 additions & 0 deletions soc/nxp/imxrt/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,11 @@ config INIT_SYS_PLL

endif # SOC_SERIES_IMXRT10XX || SOC_SERIES_IMXRT11XX

config NXP_IMX_RT_USER_MPU_REGIONS
bool "User mpu regions"
help
When this option is enabled user should define custom mpu regions:
const struct arm_mpu_config mpu_config = {...};
See example in zephyr/soc/nxp/imxrt/mpu_regions.c.

endif # SOC_FAMILY_NXP_IMXRT

0 comments on commit 95f41e6

Please sign in to comment.