Closed GrixaYrev closed 5 days ago
I suggest to add configuration option NXP_IMX_RT_USER_MPU_REGIONS
to zephyr\soc\nxp\imxrt\Kconfig.
I can prepare PR.
@teburd, @dleach02, what do you think about my suggestion?
@GrixaYrev, isn't the board level device tree entry for SDRAM with CONFIG_NXP_IMX_EXTERNAL_SDRAM supposed to handle this?
@dleach02, no, first two items of mpu_regions[]
is included unconditional (file zephyr\soc\nxp\imxrt\mpu_regions.c):
/* Region 0 */
MPU_REGION_ENTRY("FLASH_0",
CONFIG_FLASH_BASE_ADDRESS,
REGION_FLASH_ATTR(REGION_FLASH_SIZE)),
/* Region 1 */
MPU_REGION_ENTRY("SRAM_0",
CONFIG_SRAM_BASE_ADDRESS,
REGION_RAM_ATTR(REGION_SRAM_SIZE)),
If i set CONFIG_FLASH_SIZE=11264
and CONFIG_SRAM_SIZE=20480
i have error message "Unsupported sram size configuration".
Please prepare a PR so I can route it appropriately for internal review.
File
zephyr\soc\nxp\imxrt\mpu_regions.c
is included to sources unconditionally. So i can't use SRAM size more than 16M and less than 32M, because error inzephyr\include\zephyr\arch\arm\cortex_m\arm_mpu_mem_cfg.h:72
is rised: "Unsupported sram size configuration".I think additional Kconfig option need for exclude
zephyr\soc\nxp\imxrt\mpu_regions.c
from sources.I use custom board based on iMX.RT1052 with external SDRAM. Part SDRAM used as FLASH (for bootloader and application), other space as RAM.
Version of Zephyr – 3.6.99 (SHA 0714052c74bfe4e74ae6fca705da4d7d66c92681)
prj.conf: