Problems debugging iMXRT1011 project

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

Problems debugging iMXRT1011 project

12,557 Views
expertsleepers
Contributor III

I have a simple custom board based on an iMXRT1011 processor. I'm using MCUXpresso IDE v24.12 and a Segger J-Link Ultra+. I'm experienced with iMXRT development in general and the J-Link has worked fine for me on another project.

Everything started fine, but at some point, I lost the ability to debug my project. The code runs fine if I install it using the serial boot loader (via the Secure Provisioning tool), but if I flash it from the debugger it doesn't run.

It seems to crash somewhere before main(). Sometimes I can set a breakpoint in ResetISR() and step through. In these cases everything is fine if I keep single stepping, but it crashes if I let it run. Sometimes it goes straight to 0xdeadbeee and there's nothing to debugger can do.

As you can imagine this is very frustrating. Any suggestions would be gratefully received.

 

Labels (1)
0 Kudos
Reply
21 Replies

3,356 Views
expertsleepers
Contributor III

If I flash the application with SEC, it runs fine. If I connect with J-Link commander, I can halt and go successfully.

In the IDE, today I can set a breakpoint at ResetISR(). If I step over SystemInit(), it crashes. If I step into SystemInit(), step through the function and then step over SystemInitHook(), it crashes. If I do the same and step into SystemInitHook(), it does not crash. This is what I mean when I say the behaviour depends on whether the debugger is stepping over or into the code.

An example of the stack when it crashes:
 
Thread #1 57005 (Suspended : Signal : SIGTRAP:Trace/breakpoint trap)
_vfprintf_r() at 0x600134a4
0x0

 

So it looks like it's jumping to 0x0, but only when the code is freely running, not when stepping in the debugger. There is no code at 0x0 - the ITC is not being used.

Just to repeat, this is before main(), long before any RTOS or similar is invoked. It's crashing in the initial startup code.

 

0 Kudos
Reply