Issue while debugging with Optimizer OFF

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

Issue while debugging with Optimizer OFF

Jump to solution
735 Views
kpanchamia
Contributor I

Setup:

CW10.5

K61FX512

Code runs from Ext RAM

TraceLink & Multilink

 

When I turn optimizer ON ( =1), code runs alright.

If it is turned OFF ( = 0), code compiles properly & even the debugger session is invoked. But as soon as I do a "step over" at __init_registers in __thumb_startup, it shows "No source available". "Step into" does work but only for few instructions.

 

Also at this time, in the memory view, all the values are reset to 0x00. (Maybe - DDR connection broken somehow???)

 

I started a session with Tracelink too, but the trace logs aren't too helpful.

Stack & Heap are sufficiently big.

 

Any clues or suggestions?

 

Thanks

 

Update:

- Seems like a watchdog reset from RCM register

- Have tried disabling watchdog  from TCL file, inside __init_registers and __init_hardware. But no success. It still does a WDT reset

Labels (1)
0 Kudos
1 Solution
648 Views
Carlos_Musich
NXP Employee
NXP Employee


Hi Kunal,

As your code is running from external RAM I think that without optimizations the code is not fast enough, so watchdog is not being disabled or cleared on time. I recommend to keep optimizations enabled.

Regards,

Carlos

View solution in original post

0 Kudos
1 Reply
649 Views
Carlos_Musich
NXP Employee
NXP Employee


Hi Kunal,

As your code is running from external RAM I think that without optimizations the code is not fast enough, so watchdog is not being disabled or cleared on time. I recommend to keep optimizations enabled.

Regards,

Carlos

0 Kudos