custom bootloader for MXRT1052

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

custom bootloader for MXRT1052

2,448 次查看
jamesk
Contributor III

I am trying to better understand what approach I can take for application software update on MXRT1052 running with QSPI Flash. Typical scenario would be for 2ndary bootloader to receive bytes of new application, buffer them, and write them to a specific application location on the flash.

Is this an approach that NXP recommends?

Is there an example application and/or documents describing how this kind of application software update can be performed?

So in summary, both the 2ndary bootloader and application software would reside on the flash. Internal bootloader(RomBoot) would load the 2ndary bootloader and the 2ndary bootloader would load the main application if it finds a valid app.

If it does not find a valid app, it would remain and provide a mechanism to receive valid application (via network or serial or USB etc) and program it on the flash.

 

My initial response from NXP Technical Support was as follow:

RT1052 can't march your application. I recommend you take a look at the RT1064 product  which has the ROM CODE API for your application. Unfortunately, there is not the detail document for it. You may refer to the reference manual as the link.

URL:https://www.nxp.com/webapp/Download?colCode=IMXRT1064RM.

Hope it help you. Have a nice day.

I am trying to find out what this means about RT1052.

I would appreciate anyone with comments on this topic.

Regards,

James

标签 (1)
4 回复数

2,223 次查看
mjbcswitzerland
Specialist V

Hi

See the "Boot Mode" section of http://www.utasker.com/docs/iMX/i.MX_RT_1021_uTasker.pdf
for the primary/secondary loader method used in the uTasker i.MX RT project. This may gives some ideas, when not already that which is being discussed.

Regards

Mark

P.S. uTasker loaders are being rolled out at the moment:
eg.
https://www.utasker.com/iMX/RT1020.html
https://www.utasker.com/iMX/RT1060.html

2,223 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi james kim ,

   As I know, you can design your secondary bootloader code, because one of our customer already use that application.

  But, about the secondary bootloader, even you download it to the external qspi flash, when you run it, you need to copy it to the internal RAM, you can generate the ITCM code for your secondary bootloader, then burn it to the external memory. After power on, the ROM bootloader will copy your secondary bootloader to the ITCM, then run it, then then you can that secondary bootloader to update your application code, and program it to the external memory which are not the same region like the secondary bootloader.

     You can try it on your side.

    If you still have questions about it,  just 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.
-------------------------------------------------------------------------------

2,223 次查看
jamesk
Contributor III

Thanks Kerry.

Few additional questions.

1) Why does the secondary bootloader have to run from internal RAM(ITCM)?

eXecuteInPlace does not work somehow in this scenario? If so, why?

2) How do I generate an ITCM code?

3) Does an ITCM code have access to the external SDRAM?

Obviously ITCM code can read/write from/to the QSPI FLASH, right?

Thanks in advance.

0 项奖励
回复

2,223 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi james kim,

   Answer your 3 questions:

1) Why does the secondary bootloader have to run from internal RAM(ITCM)?

eXecuteInPlace does not work somehow in this scenario? If so, why?

Answer: This is determined by the external flash chip, if your external flash chip can support the RWW function, I think you also can put in the external memory. But if your external flash memory can't support the RWW function, that means, when you read the external memory(Your secondary bootloader runs in the external memory XIP), then you want to do the flash write function, then it will have problems! This is the root reason I let you put in the internal RAM, in factor, another customer who already make it works in RT050 also use the RAM code secondary bootloader, but just burn it to the external memory.

 

2) How do I generate an ITCM code?

 Answer:  This is very easy!

   I attach a simple code for your reference, which is based on the MCUXpresso IDE.

pastedImage_1.png

pastedImage_2.png

Then you can generate the app.srec, you can open it.

pastedImage_1.png

you can find, the generated code already located in the ITCM from 0XA000!

3) Does an ITCM code have access to the external SDRAM?

Obviously ITCM code can read/write from/to the QSPI FLASH, right?

Answer:  Yes, ITCM code can access to the SDRAM, ITCM also can read/write to QSPI flash, you are clever, in factor, you already figure out the secondary bootloader ITCM code reason.

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 项奖励
回复