Correct method to boot from QSPI but copy/run from on-chip RAM (DTCM/ITCM)

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

Correct method to boot from QSPI but copy/run from on-chip RAM (DTCM/ITCM)

1,426 Views
nickwallis
Senior Contributor I

Hi,

Please could anyone advise the correct, definitive method to boot from QSPI flash but copydown/run from on-chip RAM (ITCM and DTCM)?

There are lots of threads that touch on this topic but I haven't seen anywhere a complete definitive description. Perhaps this one is the closest?

https://community.nxp.com/t5/i-MX-RT/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p...

thanks

-Nick

Labels (1)
0 Kudos
10 Replies

1,330 Views
jeremyzhou
NXP Employee
NXP Employee

Hi,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
To provide the fastest possible support, I'd highly recommend you to refer to the post:
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Generating-a-Bootable-Image-for-the-RT1050/ta-p/...
Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,312 Views
nickwallis
Senior Contributor I

Thank you @jeremyzhou 

But the post you linked to talks about how to generate the files for various different boot scenarios.

My question was what is the recommended method to reconfigure the flexRAM for different sizes.

regards

-Nick

 

0 Kudos

1,279 Views
jeremyzhou
NXP Employee
NXP Employee

Thanks for your reply.
The AN12077 demonstrates the FlexRAM memory configuration, so please refer to it for details.
Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

1,306 Views
mjbcswitzerland
Specialist V

Nick

Have you read AN12077 "Using the i.MX RT FlexRAM"?

There are code examples there too but the bottom line is that NXP "strongly" recommends using the eFUSEs to set up the FlexRAM, according to most posts I find (which I also avoid religiously).

Regards

Mark

0 Kudos

1,407 Views
nickwallis
Senior Contributor I

Thanks @mjbcswitzerland 

Yes, I am aware you have put lots of hard work into the uTasker bootloader. It looks like a very flexible and powerful solution, and whilst we may consider using it in the future, at present there does not seem to be much appetite from project management for such a big change.

As well as the above, I'd also like to understand how this is working "under the hood" and know the correct, safe method to reconfigure the flexRAM. We don't want to do this by burning fuses, as (1) this is a "one-time" only option and (2) you have limited choices in the bank allocation, not all options are available.

Hopefully someone from NXP support replies here!

thanks

-Nick

0 Kudos

1,393 Views
mjbcswitzerland
Specialist V

Nick

You can do it with out any changes to your project code - that is the idea. No eFUSE programming is needed. FlexRAM configuration is on-the-fly with no restrictions (see fnConfigureFlexRAM() in iMX_Loader.h).

I'll make a video showing how to do it for any SDK program shortly.

Regards

Mark

0 Kudos

1,364 Views
mjbcswitzerland
Specialist V

@nickwallis 

As promised - here's how to do it: https://youtu.be/fnfLQ-nbscI

Takes typically 7 minutes (because you need to manually modify the linker script) and needs (normally) no changes to application code. No eFUSE programming - but with up to 10x instruction performance.

Regards

Mark

 

1,347 Views
nickwallis
Senior Contributor I

Great, thanks very much @mjbcswitzerland  - I'll give that a try!

-Nick

0 Kudos

1,335 Views
mjbcswitzerland
Specialist V

Nick

Make sure you pull the latest repository version before trying because I found that SDK examples don't always use RAM well (like they sometimes put instructons in data RAM or stack in instruction RAM) so I had to add a bit of extra flexibility when accepting foreign code so that it wasn't rejected due to unexpected use of resources.

Regards

Mark

 

0 Kudos

1,418 Views
mjbcswitzerland
Specialist V

Hi Nick

Note that if you use the uTasker loader it will allow you to load code to QSPI flash (also in AES256 encrypted form) and it will automatically relocate (and decrypt) it to ITC and partition the FlexRAM to leave as much DTC for variables and stack. Plus you get in-field loading and OTA updating at the same time.

It can be used with any application so you can still use SDK etc. if you prefer.

If your application grows with time to no longer fit in internal RAM the loader also allows updating with new applications that run in QSPI flash and are on-the-fly encrypted [https://community.nxp.com/t5/i-MX-RT/How-much-time-does-it-take-to-add-in-field-updating-and-On-the/...] so there are no restrictions to future growth or requirements.

Note that I developed the technique because I also found https://community.nxp.com/t5/i-MX-RT/A-way-to-create-a-binary-that-is-copied-to-RAM-from-the-ROM/m-p... to be overly complicated and needing to modify the config table makes in-the-field firmware updating impractical.

Regards

Mark
uTasker project developer for Kinetis and i.MX RT]
Contact me by personal message or on the uTasker web site to discuss professional training or product development requirements

 

0 Kudos