Multiple images in flash

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

Multiple images in flash

1,364 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

1,080 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.

1,285 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,344 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

1,105 Views
gavin5342
Contributor III

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

Thanks!
Gavin

0 Kudos
Reply

1,088 Views
gavin5342
Contributor III

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

0 Kudos
Reply