soc: arm: nxp_imx: update iMX RT boot header to handle CONFIG_XIP=n
Update iMX RT boot header to support CONFIG_XIP=n, when the image is not linked into the flash space. Also, update the boot header to correctly calculate the flash used size within the boot data header. This field is used by the iMX boot ROM to determine how much data to copy when running from RAM, so using the correct size fixes an issue where the ROM would copy more data than needed. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
6be48b73bf
commit
905512438e
2 changed files with 12 additions and 2 deletions
|
@ -92,8 +92,13 @@ const clock_video_pll_config_t videoPllConfig = {
|
|||
|
||||
#ifdef CONFIG_NXP_IMX_RT_BOOT_HEADER
|
||||
const __imx_boot_data_section BOOT_DATA_T boot_data = {
|
||||
#ifdef CONFIG_XIP
|
||||
.start = CONFIG_FLASH_BASE_ADDRESS,
|
||||
.size = KB(CONFIG_FLASH_SIZE),
|
||||
.size = (uint32_t)&_flash_used,
|
||||
#else
|
||||
.start = CONFIG_SRAM_BASE_ADDRESS,
|
||||
.size = (uint32_t)&_image_ram_size,
|
||||
#endif
|
||||
.plugin = PLUGIN_FLAG,
|
||||
.placeholder = 0xFFFFFFFF,
|
||||
};
|
||||
|
|
|
@ -120,8 +120,13 @@ static const clock_video_pll_config_t videoPllConfig = {
|
|||
|
||||
#ifdef CONFIG_NXP_IMX_RT_BOOT_HEADER
|
||||
const __imx_boot_data_section BOOT_DATA_T boot_data = {
|
||||
#ifdef CONFIG_XIP
|
||||
.start = CONFIG_FLASH_BASE_ADDRESS,
|
||||
.size = KB(CONFIG_FLASH_SIZE),
|
||||
.size = (uint32_t)&_flash_used,
|
||||
#else
|
||||
.start = CONFIG_SRAM_BASE_ADDRESS,
|
||||
.size = (uint32_t)&_image_ram_size,
|
||||
#endif
|
||||
.plugin = PLUGIN_FLAG,
|
||||
.placeholder = 0xFFFFFFFF,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue