iMXRT1064 External Flash XIP Support

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

iMXRT1064 External Flash XIP Support

ソリューションへジャンプ
6,016件の閲覧回数
prashanthkk
Contributor II

Hi team,

We are having iMXRT1064 with 16MB External SPI Flash and also having 4MB Internal Flash.

As of now we are running Secondary bootloader and Application in Internal Flash. But now we want to run bootloader from Internal flash and  Application from External Flash.

So now we want to how to implement XIP on our bootloader to execute the Application from External flash.

Or any other approaches are available for this?

 

Best Regards,

Prashanth Kumar K

ラベル(1)
0 件の賞賛
返信
1 解決策
5,822件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
Please check the attachment.
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.
-------------------------------------------------------------------------------

元の投稿で解決策を見る

15 返答(返信)
6,000件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
1) Or any other approaches are available for this?
-- In my opinion, this scheme is feasible, firstly, you should generate an image file that links to the external QSPI, next, load the image file to the external QSPI, and it should initialize the external QSPI prior to the jump operation.
BTW, you can refer to the evkmimxrt1064_flexspi_nor_polling_transfer
to learn how to initialize the external QSPI.
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 件の賞賛
返信
5,996件の閲覧回数
prashanthkk
Contributor II

Hi Jeremyzhou,

We have loaded the application in external flash at memory 0x60xxxxxx. In bootloader we have done the same init sequence as "evkmimxrt1064_flexspi_nor_polling_transfer" in the program mentioned. then we point our application entry and vector table to external flash in the bootloader. But its not jumping to the external flash and not execute in place. 

We know that we can read the external flash application  to RAM from bootloader and then we run our application. But we don't want this approach.

if i can include xip header (FCB) in external flash application image. then what changes we have to do in bootloader to execute the application from external flash.

We are thinking we need some logic has to develop in bootloader to have XIP in external flash.

Thanks and Regards,

Prashanth Kumar K

0 件の賞賛
返信
5,971件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
I was wondering if you can describe your testing environment and list the steps of testing, it can help me to figure out.
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 件の賞賛
返信
5,957件の閲覧回数
prashanthkk
Contributor II

Hi,

Step 1: We flashed the application in external flash at address 0x60400000 using the Jflash tool. (This application doesn't have fcb sections, only it contains IVT table and other general sections.)

In our application,  the linker file we pointed the address of external flash starts at 0x60400000.

First step in bootloader we just init the external flash (referred in flexspi_nor_polling_transfer.c), then

use the code to start our app from bootloader using the below code

#define VECTOR_ADDR 0x60400000

uint32_t appEntry = *(uint32_t*)(VECTOR_ADDR + 4u);
uint32_t appStack = *(uint32_t*)(VECTOR_ADDR);

static void (*jump_to_application)(void);
static uint32_t stack_pointer;

jump_to_application = (void (*)(void))appEntry;
stack_pointer = (uint32_t)appStack;

SCB->VTOR = VECTOR_ADDR;

__set_MSP(stack_pointer);
__set_PSP(stack_pointer);
PRINTF("\r\n Jumping to application \r\n");

jump_to_application();

But using the external flash application it doesn't booting, but if I flash the application in internal flash (qspi) and it gets booting up. For external flash we feel we need something to boot up in XIP mode. 

Note : our application linker file is just a simple one(no other sections)

For your i'm attaching the file here.

0 件の賞賛
返信
5,857件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
I make it now, and I'd like to share the below experience.
1) The bootloader that resides in internal QSPI should initialize the external QSPI prior to jumping to.
2) The application should be programmed to correct the area in the external QSPI.
3) In the application, it should avoid initializing the FlexSPI1 that connects the external QSPI.

jeremyzhou_0-1639040030005.png


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

 

5,841件の閲覧回数
prashanthkk
Contributor II

Hi,

Thank you very much for your kind support, if possible can you share your code please?

 

Thanks & Regards

Prashanth 

0 件の賞賛
返信
5,823件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
Please check the attachment.
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.
-------------------------------------------------------------------------------

5,814件の閲覧回数
prashanthkk
Contributor II

Thanks for your great help, we are able to boot up your led blink app, but if we boot our app then we are not able to get it up. then we noticed you have added the vectorTableRam linker section and function named "BOARD_RelocateVectorTableToRam(void)" and one more changes

//MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_FULL, 2, 0, 0, 0, 0, ARM_MPU_REGION_SIZE_512MB);
MPU->RASR = ARM_MPU_RASR(0, ARM_MPU_AP_RO, 0, 0, 1, 1, 0,ARM_MPU_REGION_SIZE_512MB);

could you please explain why we are doing relocating Vector table to RAM and from where we are relocating (internal flash or external flash)?

0 件の賞賛
返信
5,807件の閲覧回数
prashanthkk
Contributor II

Hi,

 

We now understood the problem in our application, we didn't disable clock for flexspi that's the problem.

Again thanks for your great help, 

 

Thanks & Regards

Prashanth.

タグ(1)
0 件の賞賛
返信
5,734件の閲覧回数
prashanthkk
Contributor II

Hi,

We are facing problem when we use the "evkmimxrt1064_littlevgl_guider" examples with the shared boot loader code. We also disabled the clock for external flash in the littlevgl_guider examples. But bootloader doesn't start the app.

Output log:

FLEXSPI example started!

Reset status reghister is 0x3
Vendor ID: 0x9d

FLEXSPI example started!

Reset status reghister is 0x3
Vendor ID: 0x9d

FLEXSPI example started!

Reset status reghister is 0x3
Vendor ID: 0x9d

FLEXSPI example started!

Reset status reghister is 0x3
Vendor ID: 0x9d

Could you please help us to proceed further? this only happens when lvgl is enabled.

0 件の賞賛
返信
5,673件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
1) Could you please help us to proceed further?
-- According to Reset status register indication, the reset is caused by CPU lockup, which root cause is encountering HardFault issue.
From my experience, I'd like to suggest you port the library to evkmimxrt1064_littlevgl_guider to figure out the line that triggers the HardFault issue.
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 件の賞賛
返信
5,934件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
Thanks for your reply.
I was wondering if you can share the bin file of the application, further, please shows the steps of programming the bin file to the external QSPI via the Jflash tool.
Hope it helps.
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 件の賞賛
返信
5,927件の閲覧回数
prashanthkk
Contributor II

Hi Jeremyzhou,

I have attached sample Hello_world.bin and images included with steps of programming the bin file to the external QSPI via the Jflash tool.

Regards,

Prashanth Kumar K

0 件の賞賛
返信
5,913件の閲覧回数
prashanthkk
Contributor II

Hi,

Could you help us to configure custom LUT for XIP mode for the 'IS25WP064AJBLE' QSPI?

Do you think we are missing this part?

Note: We are using IMXRT1064 EVM External QSPI Flash (No Hardware Changes).

Regards,

Prashanth Kumar K 

0 件の賞賛
返信
5,878件の閲覧回数
jeremyzhou
NXP Employee
NXP Employee

Hi,
1)Do you think we are missing this part?
-- No, I don't think so.
I'm still working on it.
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 件の賞賛
返信