LED blinky example from SDK of RT118X can't startup after power on

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

LED blinky example from SDK of RT118X can't startup after power on

2,152 Views
shengs
Contributor II

I have a MIMXRT1180-EVK board, and my IDE is MCUXpresso for VS Code, the SDK version is 2.16.000, J-Link is used, JP4 is shorted. I have questions about debugging.

First, SW5[2:4]=001, the "evkmimxrt1180_rled_blinky_demo_cm33" work well using the "debug" build configuration, I can download and debug the demo code, and the "D6" LED was blinking. But it can't work after power on again.

Second, SW5[2:4]=100, I can download the blinky demo using "flexspi_nor_hyperram_debug", but can't debug it. The breakpoint in the main() can't be reached. I don't know why.

ShengShuang_0-1721803408355.png

Third, I open the "vkmimxrt1180_rled_blinky_demo_cm33\armgcc\flexspi_nor_hyperram_debug\rled_blinky_demo_cm33.elf", find that it is start from 0x28000B00. And the "vkmimxrt1180_rled_blinky_demo_cm33\armgcc\MIMXRT1189xxxxx_cm33_flexspi_nor_hyperram.ld" show that the app_image_offset is 0x0000B0000.

ShengShuang_1-1721803756716.png

Why does the image not start from 0x28000000?

Fourth,  after power on again, I readout entire flash using J-Link, and I find that the content start from 0x2800B000 is same with rled_blinky_demo_cm33.elf. And the content between 0x28000000 and 0x2800B000 is 0xFF.

ShengShuang_2-1721803919291.png

Can you help me? I want the code startup after power on again.

 

Tags (2)
0 Kudos
Reply
20 Replies

2,114 Views
HangZhang
NXP Employee
NXP Employee

Hi @shengs 

I tested it on my RT1180EVK Board. It can work.

But i use the MCUXpresso IDE.

The SW5[2:4]=001, and i debug the evkmimxrt1180_rled_blinky_demo_cm33. when i reset the board, it can work.

You can try to download MCUXpresso IDE.

I will also try to use VScode.

Hope this will help you.

BR

Hang

0 Kudos
Reply

2,110 Views
shengs
Contributor II

Hi, @HangZhang 

I tested blink demo using MCUXpresso IDE before, both debug and release mode. It works well. But my team tends to use VS Code as our IDE for some reasons.

0 Kudos
Reply

2,106 Views
shengs
Contributor II

SW5[2:4]=100. The LED blinks @1Hz after power on again.

0 Kudos
Reply

2,071 Views
HangZhang
NXP Employee
NXP Employee

Hi @shengs 

Can it work now?

BR

Hang

0 Kudos
Reply

2,062 Views
shengs
Contributor II

No yet with VS code.

Have you tested it?

0 Kudos
Reply

2,056 Views
HangZhang
NXP Employee
NXP Employee

Hi @shengs 

I have tested it.

As you mentioned.

I imported the evkmimxrt1180_rled_blinky_demo_cm33, 

and set flexspi_nor_debug as default.

HangZhang_0-1721983313570.png

HangZhang_1-1721983563680.png

I didn't change the SW5.

It can work.

Hope this will help you.

BR

Hang

0 Kudos
Reply

2,053 Views
shengs
Contributor II

Can you debug it? Can it blink power on again?

0 Kudos
Reply

2,048 Views
HangZhang
NXP Employee
NXP Employee

Hi @shengs 

Sure, I can debug it,  and it can  blink power on again.

BR

Hang

0 Kudos
Reply

2,041 Views
shengs
Contributor II

Can you use J-Link to test again? 

The JP4 and JP5 is shorted on my board.

0 Kudos
Reply

1,863 Views
HangZhang
NXP Employee
NXP Employee

Hi @shengs 

Are you configuring flexspi_nor_debug as the default mode?

I tested it with jlink, but it can debug only in debug mode.

I flexspi_nor_debug mode, it can not work.

BR

Hang

0 Kudos
Reply

1,806 Views
shengs
Contributor II

是的,我使用Jlink的情况下只能在“debug”或者“release”模式下调试,其他所有模式都不行。你这边也是这样吗?我最终目的是想在flexspi_nor和flexspi_nor_hyprram模式下使用Jlink能正常调试,且板子重新上电后点灯程序能正常启动。

shengs_0-1722325249763.png

 

0 Kudos
Reply

1,781 Views
HangZhang
NXP Employee
NXP Employee

Hi

是的,如果使用jlink,目前Vscode中只能在“debug”或者“release”模式下调试。如果您想板子重新上电后点灯程序能正常启动。建议用板载debuger。

BR

Hang

0 Kudos
Reply

1,770 Views
shengs
Contributor II

如果使用J-Link,如何才能使用其他带flexspi的模式调试、重新上电运行?之前说过,我们的项目组期望真实产品的开发过程使用J-Link。谢谢!

0 Kudos
Reply

1,725 Views
HangZhang
NXP Employee
NXP Employee

Hi @shengs 

如果您想用jlink 结合flexspi_nor_debug,经过测试,IAR 没有问题,但是vscode目前存在问题,目前正在调查这个问题。

谢谢

BR

Hang

0 Kudos
Reply

1,636 Views
shengs
Contributor II

如有进展能够通过这个工单通知我吗?谢谢!

0 Kudos
Reply

1,593 Views
shengs
Contributor II

原因找到了,是XIP_BOOT_HEADER_ENABLE没有使能,见"MCUXpresso_SDK_V2.16_MIMXRT1180-EVK_Repository\docs\Getting Started with MCUXpresso SDK for MIMXRT1180-EVK.pdf"

shengs_0-1722901483444.png

对于MCUXpresso for VS Code,在evkmimxrt1180_rled_blinky_demo_cm33\armgcc\flags.cmake文件里更改。

 

0 Kudos
Reply

1,538 Views
HangZhang
NXP Employee
NXP Employee

Hi @shengs 

是的,您说的是对的,如果需要从flash启动,这个XIP_BOOT_HEADER_ENABLE是需要使能的。

感谢您提供的信息。

BR

Hang

0 Kudos
Reply

1,586 Views
shengs
Contributor II
对于MCUXpresso for VS Code,使能XIP_BOOT_HEADER_ENABLE可以使flexspi_nor_模式的代码上电启动,但是仍然不能调试。
0 Kudos
Reply

2,045 Views
shengs
Contributor II

I notice that the on-board debugger is used in your setup. But I use J-Link. 

0 Kudos
Reply

2,150 Views
shengs
Contributor II

Sorry for mistakes.

0x28000B00 should be corrected to 0x28000B000, 0x0000B0000 should be corrected to 0x0000B000.

0 Kudos
Reply