Load instructions into RAM from external flash while executing in place (XIP) on IMXRT1062

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Load instructions into RAM from external flash while executing in place (XIP) on IMXRT1062

ソリューションへジャンプ
1,460件の閲覧回数
ess1
Contributor I

Hello,

Me and my colleagues are developing a product using the IMXRT1062 MCU with external flash MX25UM51345G which we communicate with through OSPI. We've developed both a bootloader and an application and execute these using XIP.

We want to be able to flash a new application from the bootloader. To my understanding, we can't write or erase the flash while executing in place (XIP), is this correct?

If so, we need to load the bootloader instructions into RAM and run the program from there. Does anyone have any suggestions on how to do this?

I've attached the .icf file we use.

Best Regards

Eirik

ラベル(1)
タグ(2)
1 解決策
1,310件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Eirik Storesund,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) If so, we need to load the bootloader instructions into RAM and run the program from there. Does anyone have any suggestions on how to do this?
-- For RT1060, It's not necessary to make it run in the RAM actually, because RT1060 contain the ROM FlexSPI APIs which provide the driver function to implement the flash operations, such as erase and program. However, a flash operation shouldn't happen in the sector which is also occupied by the bootloader.

I've attached a demo project which illustrates how to call the ROM FlexSPI APIs, please check it.

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 返答(返信)
1,310件の閲覧回数
ess1
Contributor I

Hi,

Thank you for your reply!

The attachment contained exactly what I needed. I copied bl_api.c/.h and flexspi_nor_flash.h to my project. 

The only editing I had to do was to set configOption.option0.U to match my external flash setting (which in my case is 0xC0403006).

Have a great day!

Eirik

0 件の賞賛
1,311件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi Eirik Storesund,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) If so, we need to load the bootloader instructions into RAM and run the program from there. Does anyone have any suggestions on how to do this?
-- For RT1060, It's not necessary to make it run in the RAM actually, because RT1060 contain the ROM FlexSPI APIs which provide the driver function to implement the flash operations, such as erase and program. However, a flash operation shouldn't happen in the sector which is also occupied by the bootloader.

I've attached a demo project which illustrates how to call the ROM FlexSPI APIs, please check it.

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