Application runs from RAM but not from QSPI configured for XIP.

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

Application runs from RAM but not from QSPI configured for XIP.

1,215 Views
thivya_ashokkum
Contributor II

Hi there,

I'm using an i.MXRT1052 and I'm trying to run XIP from the QSPI flash. i use MCUXpresso IDE v11.0.1. I've made all the necessary changes mentioned in the application notes. I'm also able to run the sdk sample projects from the flash. However, when I try my own project, I have no problem when I run the code from RAM by selecting "Link Application to RAM" and I'm able to step through all my functions and it works as expected. However, when I uncheck the option and try to run it XIP in flash, I see something strange in my Disassembly window and there are no actual jump addresses for functions and when I try to step into my functions, it just drops through the stack and none of the functions are executed. 

I'm attaching a screenshot of my disassembly where there are no actual jump addresses to the locations where the function definitions live. 

If anyone can throw some light on what I'm missing here to make it run from the flash, it'll be of great help.

Labels (1)
0 Kudos
Reply
3 Replies

1,090 Views
thivya_ashokkum
Contributor II

Hi Kerry,

You're right. My application is in the flash but I'm unable to enter into any of my functions. When I run it from RAM, my disassembly has a bl <flashaddr> statement for every function and stepping into the function takes me to the address where the function implementation lives. 

I have the following symbols enabled

XIP_EXTERNAL_FLASH=1
XIP_BOOT_HEADER_ENABLE=1

The sample sdk applications run out of the flash without any issues. I can run almost all of the sdk samples from flash and RAM. I don't understand what I'm missing in my application. 

0 Kudos
Reply

1,090 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi THIVYA ASHOK KUMAR,

   I have a suggestion.

   You can choose one SDK samples which runs OK on your side, then you can add your own app function one by one to the SDK base project, then test it to find the problems, which detail function caused your problem.

   Please try it on your side.

Any updated information, please kindly let me know.

Wish it helps you!

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

1,090 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi THIVYA ASHOK KUMAR,

  After checking your attached picutre, you code already in the external QSPI flash, but you said:

no actual jump addresses to the locations where the function definitions live.

  Please give me more details about it?

  Do you mean your code didn't really enter BOARD_InitBootPIns?

  In your code,if you want to run from the external QSPI, do you enable these symbols:

XIP_EXTERNAL_FLASH=1
XIP_BOOT_HEADER_ENABLE=1

   BTW, do you debug the official SDK code which can run from QSPI directly, whether it works OK or not on your side?

Wish it helps you!

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
Reply