Hi,
For K22F120M board and MQX4.1 OS, I found if I set a breakpont in interrupt routine, once this interrupt be trigger, KDS will stop at this breakpoint, but at this time, any step (step in, step return, step over) will not work, even 'run' also will not work. the KDS console keep printting like this "Read 2 bytes @ address 0x0000060c (Data = 0xB408)"
.The same project in IAR enviroment , the same breakpoint at interrupt routine will work as normal.
Any one has the same problem ? Any idea about this ?
Solved! Go to Solution.
Yes, it seems to be a problem with GDB and doing the stack backtrace.
For J-Link, can you add the
set backtrace limit
command with a number like 20 to it? See below. This limits the number of backtraces.
Let me know if this helps.
Erich
I don't have that board, and I don't see such a problem e.g. with FreeRTOS and the FRDM-K64F board. But it could be because MQX is treating interrupts in a special way?
The KDS debugger has this kind of error just after instruction "blx reg", but at this pointer, I close KDS and open JLink, JLink can connect my K22 board, and "step" command in Jlink is OK, seem this is just a IDE debugger issue.
Yes, it seems to be a problem with GDB and doing the stack backtrace.
For J-Link, can you add the
set backtrace limit
command with a number like 20 to it? See below. This limits the number of backtraces.
Let me know if this helps.
Erich
Hi Erich,
I have the same issue on the MKL26Z128VFT4, KDS 1.1.1 (Linux), updated processor expert and the latest FreeRTOS. The "set backtrace limit 20" did not help in my case. I can set break points and the program stops at breakpoints; however it does not step into or step over, instead it keeps running. Do you have any other suggestions to solve this issue.
I'm using Segger GDB server to debug.
Best,
Sina
Hi Sina,
could you post a screenshot? Does the breakpoint having that 'checkmark' so it is set at a valid code address/line?
Erich
Hi Sina,
or could you post your project? maybe I'm missing a setup or something.
Erich
Hi Sina,
that number 20 to limit the number of backtraces is arbitrary. Can you try a lower number, say 5 or 3, or even 1?
Erich
Thank you for your help Erich. You helped me to identify that the problem was about the hardware breakpoint limits. Although, I had unlimited flash breakpoints enabled on my segger j-link debugger for some reason it didn't work properly in linux. I moved my project to Windows and everything works fine now.
Best,
Sina
Hi Erich,
Thank you for your prompt responses. Lowering the number of backtraces worked for stepping in main() before starting FreeRTOS tasks. My breakpoints all have 'checkmarks' when in debugging mode. Would it be possible that I send you the project privately instead of posting it here?
Best,
Sina
Hi Erich:
GDB "set backtrace limit 20" option works for debug at MQX ISR environment.
Thanks!
Maybe the MQX handle the ISR in special way, but after I checked the MQX interrupt handler code rawly, I don't see the special.
Thanks.