Very strange debugging behavior

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

Very strange debugging behavior

Jump to solution
711 Views
dan_quist
Contributor III

Running into some very odd behavior during debug sessions. 

 

We're using a K40512 chip on a custom board, MQX 3.8, CW 10.2.

 

If the debug entry point is set to something in the application like main, it will always break at line 60 in idletask.c which is.

_GET_KERNEL_DATA(kernel_data);

 

If I set a breakpoint somewhere, the PC will often break in the idle task and I have to hit resume again before I actually get to the breakpoint

 

Sometimes while stepping through code, the PC will randomly jump to SVC_TASK_BLOCK or SVC_TASK_SWITCH in dispatch.s and the entire debug session then locks up. A reset command will hang at 0%.

 

The project and MQX have been cleaned and rebuitl several times. 

 

We had been using the kwikstick k40 project as our mqx project template and have modified the .mem and .lcf files to take advantage of the extra 256k of flash. Our basic code did not have these debug problems before making the switch, but we also couldn't run a large part of our application without the flash increase.

 

Any ideas?

0 Kudos
Reply
1 Solution
551 Views
dan_quist
Contributor III

Well I have discovered that Task-Aware Debugging is to blame. If I turn off OS-Awareness everything behaves as it should.

 

Why is TAD breaking my debug sessions?

View solution in original post

0 Kudos
Reply
1 Reply
552 Views
dan_quist
Contributor III

Well I have discovered that Task-Aware Debugging is to blame. If I turn off OS-Awareness everything behaves as it should.

 

Why is TAD breaking my debug sessions?

0 Kudos
Reply