RT 1064 Flashloader

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

RT 1064 Flashloader

2,640 Views
alin_butoi
Contributor II

Hello,

I am trying to load an application image (blinky) to the RT 1064 evaluation board via the Flashloader. Both the blinky app and the Flashloader are stored in flash memory. The Flashloader is configured as execute out of RAM and the blinky app is currently configured as execute in place out of flash.

I build the Flashloader image to run out of RAM using the configuration provided with SDK_2.6.1_EVK-MIMXRT1064. Initially, the Flashloader image is downloaded using the Mfgtool while the evaluation board is set to serial download mode using the BOOT_MODE[1:0] register (SW7(1-4): 'OFF' 'OFF' 'OFF' 'ON'). Once the MfgTool confirms a successful download of the Flashloader image, the configuration is changed to internal boot mode in order to boot from Flexspi nor flash by changing SW7 to: 'OFF' 'OFF' 'ON' 'OFF', and a hardware reset is performed.

I am able to confirm the Flashloader app is running after the reset by requesting the version of the bootloader process currently running via the command "./blhost.exe -u -- get-property 1" inside the blhost tool.

I would like to download the blinky app to flash without overwriting the Flashloader program data which is also stored in flash, and to be able to have blinky execute in place after reset.

1. I would like to confirm that my approach regarding the process of executing the Flashloader in RAM and using it to load the blinky app into flash and executing in place is indeed feasible.

2. It is important to note that the above scenario has Flashloader executing out of RAM and blinky app image executing out of flash. We would also like to confirm that with the flshloader executing in RAM, the app image can be loaded into RAM to also execute out of RAM. Can you please confirm if this is possible, Flashloader and blinky app both execute out of RAM?

Note: The blinky app in this post represents any application level image that may be developed.

Thank you in advance for your time!

7 Replies

2,015 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Alin Butoi,

1. I would like to confirm that my approach regarding the process of executing the Flashloader in RAM and using it to load the blinky app into flash and executing in place is indeed feasible.
-- Yes, it's feasible, so whether you have already made this implementation.
2. It is important to note that the above scenario has Flashloader executing out of RAM and blinky app image executing out of flash. We would also like to confirm that with the flash loader executing in RAM, the app image can be loaded into RAM to also execute out of RAM. Can you please confirm if this is possible, Flashloader and blinky app both execute out of RAM?
-- When the MCU bootS, the flashloader is loaded in the RAM to run, then you want to load the blinky app to some other RAM area, likes SDRAM, after completing above work, jump to the blinky app from the flashloader, is it right?
If yes, I think it's feasible too.

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.
-------------------------------------------------------------------------------

2,015 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Alin Butoi

 1. I would like to confirm that my approach regarding the process of executing the Flashloader in RAM and using it to load the blinky app into flash and executing in place is indeed feasible.

This approach should be possible, you would have to set the offset of your blinky app to above the size of the flashloader and only erase and program the section that you need.

But there is a problem with your approach, once that you are in the flash loader (executing in RAM), you need to config the memory that you going to use (in this case the embedded nor memory), and this "configuration" implies an erase of the memory, so this is not posbbile with the flashloader of the mcuboot.

Sorry for the inconveniences that this may casue you.

Best regards

Jorge Alcala

0 Kudos
Reply

2,015 Views
mikehines
Contributor II

Can you clarify? I have the following differing interpretations of what you said:

1) You are required to execute your application code out of the same memory that the flashloader is executing out of.  

OR

2) In order to execute out of nor flash you have to erase the memory before executing out of it.  - How does that work??  What would you be executing then??

OR

3) I am totally missing your point.

This is how I see it.  

1) Flashloader is in flash via mfg tool (customer already confirmed this)

2) Application code is loaded into flash via flashloader at memory address offset to account for the flashloader

3) Flashloader changes MCU to execute out of flash

4) Flashloader jumps to flash address that is start of application code

Not sure on the proper order or commands of steps 3 and 4.  Could you clarify?

Thank you,

Mike

0 Kudos
Reply

2,015 Views
jorge_a_vazquez
NXP Employee
NXP Employee

Hi Mike Hines

In my understanding you want:

1) Program the "flashloader" in the nor flash with the mfgtool.

2) execute the flashloader (which will be executed in RAM)

3) program your App image in an offset above the flashloader in the nor flash (in order to keep the flashloader that you program with the mfgtool)

4) jump to your App image.

Is this correct?

The problem that I mentioned lies in step 3. When you excecute (in RAM) the flashloader to program the App image, the flashloader will execute a erase command in the nor flash memory that it will program, so you will lose your flashloader programmed by the mfgtool (which in my understanding you want to keep).

You can perform the above steps, but you will lose the flashloader of the nor memory.

Hope this helps

Best regards

2,015 Views
alin_butoi
Contributor II

Hello Jorge,

I appreciate your clarifications on this matter thus far, but as Michael Hines has also posted, I am questioning the use of the flashloader application if we lose the flashloader programmed with mfgtool once an application is loaded. Please provide clarification on how the flashloader application is meant to be used! Your urgency is much appreciated! Thank you! 

Alin

0 Kudos
Reply

2,015 Views
mikehines
Contributor II

Hello Jorge,

Thank you for clarifying.  I have a couple follow on questions.

1) If the flashloader was executing out of flash would this erase requirement still exist?

2) Could the flashloader load itself back into flash after the erase command? I am thinking of a fix.

3) I question the utility of a flashloader that cannot load a new application into flash without self destroying.  Can you explain how we could use the flashloader in the traditional sense so we could load new programs in without the self destruction of the flashloader?

Thanks again for your clarification!

Mike

0 Kudos
Reply

2,016 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Michael Hines,
Firstly, According to Jorge's scheme, I consider the steps is possible when the application image doesn't occupy the same sector that is already occupied the flash loader.
Back to your question,
1) If the flashloader was executing out of flash would this erase requirement still exist?
-- It needs to execute the erase command prior to program the application image to the QSPI flash.
2) Could the flashloader load itself back into flash after the erase command? I am thinking of a fix.
-- As mentioned above, it can avoid erasing the flashloader's code in the QSPI flash.

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.
-------------------------------------------------------------------------------