soc: nxp_imx: Add support for external xip flash boot header
Adds support for the boot data, image vector table, and FlexSPI NOR config structures used by the imx rt boot ROM to boot an application from an external xip flash device. It is now possible to build and flash a bootable zephyr image to the external xip flash on the mimxrt1020_evk, mimxrt1050_evk, and mimxrt1060_evk boards via the 'ninja flash' build target and jlink runner. Note, however, that the default board configurations still link code into internal ITCM, therefore you must set CONFIG_CODE_HYPERFLASH=y or CONFIG_CODE_QSPI=y explicitly to override the default. You must also set CONFIG_NXP_IMX_RT_BOOT_HEADER=y to build the boot header into the image. Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
7bc187e428
commit
8e3004953d
11 changed files with 110 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
|||
#include <fsl_clock.h>
|
||||
#include <arch/cpu.h>
|
||||
#include <cortex_m/exc.h>
|
||||
#include <fsl_flexspi_nor_boot.h>
|
||||
|
||||
#ifdef CONFIG_INIT_ARM_PLL
|
||||
/* ARM PLL configuration for RUN mode */
|
||||
|
@ -47,6 +48,26 @@ const clock_enet_pll_config_t ethPllConfig = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NXP_IMX_RT_BOOT_HEADER
|
||||
const __imx_boot_data_section BOOT_DATA_T boot_data = {
|
||||
.start = CONFIG_FLASH_BASE_ADDRESS,
|
||||
.size = CONFIG_FLASH_SIZE,
|
||||
.plugin = PLUGIN_FLAG,
|
||||
.placeholder = 0xFFFFFFFF,
|
||||
};
|
||||
|
||||
const __imx_boot_ivt_section ivt image_vector_table = {
|
||||
.hdr = IVT_HEADER,
|
||||
.entry = CONFIG_FLASH_BASE_ADDRESS + CONFIG_TEXT_SECTION_OFFSET,
|
||||
.reserved1 = IVT_RSVD,
|
||||
.dcd = (uint32_t) NULL,
|
||||
.boot_data = (uint32_t) &boot_data,
|
||||
.self = (uint32_t) &image_vector_table,
|
||||
.csf = (uint32_t)CSF_ADDRESS,
|
||||
.reserved2 = IVT_RSVD,
|
||||
};
|
||||
#endif
|
||||
|
||||
/**
|
||||
*
|
||||
* @brief Initialize the system clock
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue