Upgrade code from SD card

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

Upgrade code from SD card

1,880 Views
DerekXiang
Contributor I

Hello all,

            On MIMXRT1020 EVK borad, I want to upgrade application code form SD card. How to realize?  I do not find the data and examples about IAP function.

Labels (1)
0 Kudos
6 Replies

1,675 Views
DerekXiang
Contributor I

Hi, Jay,

     According to your idea, there are two full bootable images(First bootable image + Second bootable image) in QSPI NOR flash after upgrade. But I have two question:

      1. After Power-On, the BootROM will upload the image vector from the fixed QSPI address(0x6000 1000). So the first image will perform. So I must skip to the second image from the first image by code. Is this?

      2. BootROM decode the first image and upload to SDRAM. So I need write the code to decode the second image and copy to SDRAM. How to write the decode code for the second image?

0 Kudos

1,675 Views
DerekXiang
Contributor I

Hi, 

      I view the mcu-boot component in RT1060 SDK. It is one MCU flashloader, and need connect the PC, then download the image to the special store device by USB-HID or UART。

       It is not same. My means, after plug in the SD card, user select the special file in SD card, then update customer application code(in QSPI NOR flash). The system reset, and run the new code. In this process, we need the following question yet:

        1、In update application, Fault or Power-off appears.  the system need run normally after this.

         2、If the system enable the secure boot function(authentication and encryption), after update, whether the system normally reboot?

        I do not think the good method about these question. How to realize this IAP function?

0 Kudos

1,675 Views
jay_heng
NXP Employee
NXP Employee

Hi Derek.

  1. You need to implement reliable-update during IAP process, the old app in NOR Flash shouldn't be erased directly, new app in SD Card should be copied to backup NOR Flash region, and then you can take use of FlexSPI Remap feature to switch app.

   2. Both old and new app should be singned or encrypted if secure boot is enabled

Best Regards,

Jay

0 Kudos

1,675 Views
DerekXiang
Contributor I

Hi, Kerry,

      I see. We can program bootable image to SD card by the MCUBootUtility tool, then system can reboot from SD card.

      But my application scene is not this.

      Normally, my code stored in QSPI flash, the system reboot from QSPI flash to SDRAM, then run in SDRAM. After inserting SD card, I can select the image in SD card by LCD display, then updata the code(in QSPI flash) by SD card. This is one IAP function. How to reach it? 

0 Kudos

1,675 Views
jay_heng
NXP Employee
NXP Employee

You will need a IAP flashloader which can access both QSPI and SD. for RT105x/RT106x, you can refer to \SDK_2.5.0_EVK-MIMXRT1060\middleware\mcu-boot, but for RT102x, as far as i know, mcu-boot is not in its latest SDK release.

1,675 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi Derek Xiang,

    I suggest you use MCUBootUtility tool, which can be downloaded from this link:

https://github.com/JayHeng/NXP-MCUBootUtility/releases/tag/v1.4.0

pastedImage_2.png

About the detail usage, please refer to the user manual:GitHub - JayHeng/NXP-MCUBootUtility: A one-stop utility tool based on Python2.7+wxPython4.0, it can ... 

  This tool already support the SD card boot with RT1020.

You can try it on your side.

Wish it helps you!

If you still have question about it, please kindly let me know.

Have a great day,
Kerry

 

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