MXRT1050 unable download and debug QSPI flash with jlink version 7.94b

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

MXRT1050 unable download and debug QSPI flash with jlink version 7.94b

跳至解决方案
2,620 次查看
Elsa_7561
Contributor II

I use MCUXpresso IDE demo "hello world", and I want to download and debug QSPI Nor flash with jlink V7.94b, but I always get "Break at address "0x20000182" with no debug information available, or outside of program code."

MCUXpresso IDE version: v11.5.1

Nor Flash: IS25LP128F

Jlink version: 7.94

BOOT_MODE[1,0]=10, internal Boot

BOOT_CFG2[3,2,1,0] = 0111

BOOT_CFG1[7~0]=0000,1100 

my qspi configuration as below, I have tried to mofify some parameters of qspi flash config, but it did not work,

const flexspi_nor_config_t qspiflash_config = {
.memConfig =
{
.tag = FLEXSPI_CFG_BLK_TAG,
.version = FLEXSPI_CFG_BLK_VERSION,
.readSampleClksrc=kFlexSPIReadSampleClk_LoopbackFromDqsPad,
.csHoldTime = 3u,
.csSetupTime = 3u,
.sflashPadType = kSerialFlash_4Pads,
.serialClkFreq = kFlexSpiSerialClk_100MHz,
.sflashA1Size = 8u * 1024u * 1024u,
.lookupTable =
{
// Read LUTs
FLEXSPI_LUT_SEQ(CMD_SDR, FLEXSPI_1PAD, 0xEB, RADDR_SDR, FLEXSPI_4PAD, 0x18),
FLEXSPI_LUT_SEQ(DUMMY_SDR, FLEXSPI_4PAD, 0x06, READ_SDR, FLEXSPI_4PAD, 0x04),
},
},
.pageSize = 256u,
.sectorSize = 4u * 1024u,
.blockSize = 64u * 1024u,
.isUniformBlockSize = false,
};

I have tried flash driver MIMXRT1050-EVK_IS25WP064A.cfx and MIMXRT1050_SFDP_QSPI.cfx, but got the same issue.

ivy_shi_0-1704260095611.png

and the logs as attached 

 

标签 (1)
0 项奖励
回复
1 解答
2,524 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Elsa_7561 ,

   Ok, things easy now.

  I say the SDRAM, as the memory from 0X80000000 is the SDRAM area, if you don't need it, you don't need to enable it, you can delete it, you also don't need to enable the DCD.

  In your previous email, you mentioned this area, this let me think you use the SDRAM, and lack the SDRAM init code.

  So now, just delete the memory from 0X80000000:

kerryzhou_0-1704364168702.png

 

Then do the debug again.

Don't need the sdram jlinkscript, if you still have question about it, please kindly let me know.

Best Regards,

Kerry

在原帖中查看解决方案

0 项奖励
回复
11 回复数
2,612 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Elsa_7561 ,

   I find you are from China, so, you can refer to some of my chinese document:

https://www.nxpic.org.cn/module/forum/thread-615897-1-1.html

https://www.nxpic.org.cn/module/forum/thread-617059-1-1.html

  This is based on the MIMXRT1050-EVKB board, modify the on board flash from hyper to QSPI, and do the program and debug.

  Please refer to my document at first.

  If you still have issues about it, please kindly let me know.

Best Regards,

kerry

0 项奖励
回复
2,604 次查看
Elsa_7561
Contributor II

Hi, thanks for your reply. my jlink version is newer than your example, so there is no JLinkDevices.xml file in my local. so I tried another way, I modified the QSPI configuration following your link, and convert the .axf file to create a hex(bin) file, and then open my jflash.exe, select the Nor flash, I could program successfully but the system can not run(I did not get "hello world" from debug port). it looks that I need to do other configuration but I have no idea for this.

Elsa_7561_0-1704272734707.png

 

0 项奖励
回复
2,600 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Elsa_7561 ,

   Thanks for your updated information.

   Yes, now the new JLINK driver already support the QSPI flash.

   Do you modify the FCB to the QSPI flash from the Hyperflash when you use the hello_world?

    BTW, do you change the BOOT_CFG to the QSPI?

  You can give me your board photo, if you still have questions.

Please also tell me your used JLINK driver version, I can help you to test it on my side.

Please also let me know your used board version, I mean MIMXRT1050-EVKB board version.

Your hardware also be modified, right?

When you use the JLINK debug the code, what's the result now?

 

 

Best Regards,

kerry

0 项奖励
回复
2,572 次查看
Elsa_7561
Contributor II

Hi, I use our desing board and I do not a EVK demo baord. I could debug and download with "MIMXRT1050_UFL_L0" successfully before. so I think the boot config is OK, BOOT MODE(10, internal boot), BOOT CONFIG(BOOT_CFG2[3~0]=0111, BOOT_CFG1[7~0]=0000,1100). now I upgrade the jlink to version 7.94b, but the bin / hex can not normal run after load. So I use the "hello world" demo, and the same issue. When I debug in MCUXpresso IDE, I always get below error and the code can not stop at main. full log as attached.

Elsa_7561_3-1704334607642.png

 

 

 

0 项奖励
回复
2,568 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Elsa_7561 ,

    So, you still use the RT-UFL?

   If yes, please in the MCUXPresso IDE, debug configuration, uncheck the reset before running. 

kerryzhou_0-1704336727465.png

Whether this method works on your side or not?

It is determined by what the flashdriver your are using.

BTW, whether your QSPI flash is the new or not, if it is new, you need to enable the QE bit at first, as I know , the default JLINK flashdriver didn't enable the QE bit.

Wish it helps you!

Best Regards,

Kerry

 

0 项奖励
回复
2,560 次查看
Elsa_7561
Contributor II

Hi, with RT-UFL, it does not work directly, I must modify the memory list as below marked RED. if NOT, the RT-UFL does not work either.  I do not konw there is any different. Now I want to use the original memory list, because in zephyr system, there is not a location to modify the memory list. 

 

Elsa_7561_0-1704352924693.png

when I use the original memory list, I could see the firmware flash successfully, but it can not normal run, it stopped at HardFault_Handler.

Elsa_7561_1-1704353549377.png

 

0 项奖励
回复
2,556 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Elsa_7561 ,

  You need to modify the memory, it is caused that you use the external SDRAM.

   If you didn't add the script which init the semc for the SDRAM, then your debug will have issues, that's why you need to change the RAM to the internal RAM.

   About the script for the SDRA, you can refer to the SDK:

 SDK_2_14_0_EVKB-IMXRT1050\boards\evkbimxrt1050\demo_apps\hello_world\evkbimxrt1050_sdram_init.jlinkscript

  You can add it to your debug configuration.Then you can use the original SDRAM memory.

 

Wish it helps you!

Best Regards,

Kerry

0 项奖励
回复
2,545 次查看
Elsa_7561
Contributor II

Hi, I checked my local, and I could see a evkbimxrt1050_sdram_init.jlinkscript file in the path evkbimxrt1050_hello_world\.mcuxpressoide_packages_support\MIMXRT1052xxxxB_support\Script.

Elsa_7561_0-1704359520845.png

 

how could I add the file to my debug configuration? by the way, our board doesn't have external SDRAM....so I am sorry that I am not very clear your point. 

In actually, in my case, I want to use zephyr OS, and I could build zephyr demo "hello world" successfully , and I get a zephyr.bin file, but when I load the bin file to target, nothing happen, no print from debug port.  it is the same issue as I use demo "hello world" in MCUXpresso IDE(with the orignial memory list). I just accidentally found this problem related to memory list in MCUXpresso IDE. but in zephyr OS, I did not find any location to modify memory list, and it does not use evkbimxrt1050_sdram_init.jlinkscript either. I tried different qspi configuration and then could got different errors (halt at hardfault handle, PC writing error...)

 

 

0 项奖励
回复
2,525 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Elsa_7561 ,

   Ok, things easy now.

  I say the SDRAM, as the memory from 0X80000000 is the SDRAM area, if you don't need it, you don't need to enable it, you can delete it, you also don't need to enable the DCD.

  In your previous email, you mentioned this area, this let me think you use the SDRAM, and lack the SDRAM init code.

  So now, just delete the memory from 0X80000000:

kerryzhou_0-1704364168702.png

 

Then do the debug again.

Don't need the sdram jlinkscript, if you still have question about it, please kindly let me know.

Best Regards,

Kerry

0 项奖励
回复
2,471 次查看
Elsa_7561
Contributor II

thank you very much! Kerry. thanks for your reminder to delete the SDRAM, After delete the memory list, it works!!! and with the same rule, I also get a print "hello world" in my zephyr OS.

Elsa_7561_0-1704425693221.png

 

0 项奖励
回复
2,453 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

HI @Elsa_7561 ,

  Perfect!

   If your question is solved, please help to mark the correct answer, just to close this case.

   Any issues, welcome to create the new question post or case.

Best Regards,

kerry

0 项奖励
回复