Multiple images in flash

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multiple images in flash

1,034 Views
PeteA
Contributor I

We are writing a bootloader for the RT1021, and need to have a primary and secondary image, with the bootloader choosing the correct one at runtime. We are booting and running from QSPI NOR Flash (one bank, but we have a lot of available space).

At compile time, we don't know which slot the image is going to be flashed into. Currently we are looking at compiling each release twice, once for the first image and once for the second image so that the flash addresses get set correctly.

Is this the only way of doing this, or is there any way of having a flash base address set so we can use the same flash image but in different locations?

Thank you for any help.

Labels (1)
0 Kudos
Reply
5 Replies

750 Views
Masmiseim
Senior Contributor I

If your application could run from RAM only (no XiP), your Bootloader could copy the application to RAM and start it. This way you could work with a single image which is linked to RAM.

955 Views
PeteA
Contributor I

Thank you for the information, I had totally missed that! (It's not mentioned in the RT1010 to RT1020 upgrade manual).

Obviously not the result I wanted, but now I know we can work around it.

0 Kudos
Reply

1,014 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @PeteA ,

RT1010 and RT1060 have flexspi address remap function. But RT1020 and RT1050 haven't. You have to use different physical address for each image.

 

Regards,

Jing

0 Kudos
Reply

775 Views
gavin5342
Contributor III

@jingpan - Could you tell me if the new RT1040 supports remap?

Thanks!
Gavin

0 Kudos
Reply

758 Views
gavin5342
Contributor III

Looks like yes: IOMUXC_GPR_GPR[30:32] from the reference manual.

0 Kudos
Reply