imxRT1060 XIP code not debuging

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

imxRT1060 XIP code not debuging

1,239 Views
guillaume_g
Contributor II

We have design our board using an imxRT1061. When we link application to RAM we are able to launch and debug our program as expected with LPC-Link 2.

We have define FLASH section and select the correct FLASH driver.

guillaume_g_0-1665146896501.png

We have define preprocessor directive for XIP

guillaume_g_1-1665147029010.png

On the boot config pin we have select the following config

guillaume_g_2-1665147208495.png

When debuging, flash seems to be detected and programmed

guillaume_g_4-1665147421729.png

Debuger never stop at Main(), and code is not running. when i paused the debuger code seems to be in RAM range at address 0x200xxxxxx.

Seems to be a vector address issue or something like this.

any clue or step by step point check

 

 

 

 

 

0 Kudos
13 Replies

1,227 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @guillaume_g ,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
I think I need more information about your testing environment, such as the schematic, demo code, etc, further, I'd highly recommend you try to use the tool to build a connection with the QSPI to verify the hardware circuit.
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 Kudos

1,207 Views
guillaume_g
Contributor II

hi @jeremyzhou,

here is some detail on the schematic.

flash part

guillaume_g_0-1665413671568.png

MCU part:

guillaume_g_1-1665413699459.png

I am using MCU expresso V11.5.0

My sample program is base on the blinky test sample program modify to use other GPIO for LED

i made some test as you mention earlier

I have programmed a my blinky test software with the MCU boot utility without error.

My led are flashing the same way than in RAM debug. when i reset or power again my board my LED are flashing again.

So i'm assuming my flash wiring is correct. but the same program can be debug when linked to RAM and i can't when i try to link it to flash

Sometime i have lot's of trouble to connect my LPC-link2 to the board. I have burn fuse and use the BOOT mode b'00 . Is there some limitation to connect with SWD with this boot config?

regards

0 Kudos

1,223 Views
guillaume_g
Contributor II

Hi jeremy,

I have used the tool to burn fuse. I will check how to test flash.

 

thanks.

0 Kudos

1,204 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @guillaume_g ,

Thanks for your reply.
According to your testing, the MCU boot utility tool already programmed the image to the QSPI, further, the RT1052 also can boot up from it successfully, is my understanding right?
To enable debugging this QSPI, an appropriate flash driver is a precondition, so I'd like to know the kind of firmware of LPC-Link2 you used, Jlink or CMSIS-DAP?

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 Kudos

1,199 Views
guillaume_g
Contributor II

hi @jeremyzhou ,

Your understanding is correct.

I'm using LPC-LINK2 with CMSIS-DAP driver, from my understanding the flash driver is configured with the flash section, in my case the SFDP QSPI driver.

To use SFDP parameter i burn the fuse  Boot CFG 0 to 1 to auto probe parameters,is my understanding correct?

guillaume_g_0-1665471527633.png

 

0 Kudos

1,192 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @guillaume_g ,
Thanks for your reply.
Can you share the demo project you tested with?
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 Kudos

1,188 Views
guillaume_g
Contributor II

hi @jeremyzhou 

here is the project i used for my test

0 Kudos

1,183 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @guillaume_g ,
Thanks for your reply.
After having a brief review of the demo project, I've not found the definition f flexspi_nor_config_t struct, in my opinion, it's unnecessary to create a demo for testing, just import the demo from the SDK library, then adjust it to fit your board.
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 Kudos

1,170 Views
guillaume_g
Contributor II

hi@jeremyzhou 

I have made the test with a fresh blinky LED SDK project. And it work fine.

So the issue is due to the fact that we have an internal requirement to remove SDK from our project.

Is the XIP directory of the SDK project contain all the information needed to boot from FLASH?

guillaume_g_0-1665676710290.png

Or is there some APP NOTE that talk about the FDCB creation?

regards,

0 Kudos

1,138 Views
jeremyzhou
NXP Employee
NXP Employee

Hi @guillaume_g ,
Thanks for your reply.
1) Is the XIP directory of the SDK project contain all the information needed to boot from FLASH?
-- Yes, and the FDCB is unnecessary to provide manually once enable the auto-probe function, however, it still needs to keep the memory space for storing the FDCB.
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 Kudos

1,162 Views
guillaume_g
Contributor II

hi @jeremyzhou 

I am trying to make a quick and dirty test, copying the file in the XIP directory of the SDK project into my own project.

i set the preprocessor directive "XIP_BOOT_HEADER_ENABLE=1" to add flash configuration data in the image.

but when i compiled the code in the editor MCU expresso said me that defined is not set

guillaume_g_1-1665737623196.png

And when i look into the console, i have two files that are compiled with the defined set to 0

guillaume_g_2-1665737809350.png

 

The two file are evkmimxrt1060_flexspi_nor_config.c and fsl_flexspi_nor_boot.c.

The file added from the SDK project.

I don't see where this defined is cleared.

Any clue?

 

regards,

0 Kudos

1,231 Views
jay_heng
NXP Employee
NXP Employee

You set XIP_BOOT_HEADER_ENABLE=0 in preprocessor directive to test BootROM auto-probe feature, right?

I have one detailed blog on this topic (It is in chinese)

https://www.cnblogs.com/henjay724/p/14449341.html

 

Can the image boot properly after power-on reset then?

0 Kudos

1,224 Views
guillaume_g
Contributor II

Hi Jay,

the auto probe feature is enable. ihave set the XIP_BOOT_HEADER_ENABLE bit to 0 because in a App note or a forum topic i 'have seen that we should clear it. But it was set to 1 before and i have the same result.

0 Kudos