MPU配置
// \arch\arm\soc\nxp_imx\rt\arm_mpu_regions.c
#define PERIPH_BASE 0x40000000
#define PPB_BASE 0xE0000000
static struct arm_mpu_region mpu_regions[] = {
/* 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_0_SIZE)),
};
struct arm_mpu_config mpu_config = {
.num_regions = ARRAY_SIZE(mpu_regions),
.mpu_regions = mpu_regions,
};
配置 ITCM
-
CONFIG_CODE_ITCM=y
/* itcm@0 */
#define CONFIG_FLASH_BASE_ADDRESS 0x0
#define CONFIG_FLASH_LOAD_OFFSET 0
#define CONFIG_FLASH_LOAD_SIZE 0
#define CONFIG_FLASH_SIZE 128
/* dtcm@20000000 */
#define CONFIG_SRAM_BASE_ADDRESS 0x20000000
#define CONFIG_SRAM_SIZE 128
/* itcm@0