This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
I am facing an issue while debugging with CCStudio 12.2 on a TMS320F28335 microprocessor.
When I set a breakpoint inside a for() loop, the code only stops the first time at the breakpoint. I have confirmed that the code has executed the specified number of times as indicated by the for() loop. Thus, it appears that there is a specific problem with the breakpoint utility.
This issue occurs consistently with any for() loop within the project I am currently working on.
Hello,
The first thing to try is to disable any optimization and see if the issue still exists. If it does, please provide a small reproducible test case.
Thanks
ki
Hello,
I have optimization set to off, and the issue persists. I think the problem is related to a limitation to only one breakpoint at a time. If I switch the breakpoint from line 8 to line 9 of the example, I observe how 'provaLoop' is increasing from 0 to 50. However, if I set the breakpoint to either line 8 or line 9 and repeatedly press the Resume button, the code does not run, and I do not see the 'provaLoop' variable increase.
I have attached the example code:
int provaLoop = 0, provaLoop2 = 0; for (; ;) { AFQevo_StateMachine(&AFQe, &FFTe); for (provaLoop=0; provaLoop<=50; provaLoop++) { provaLoop2 = 1; provaLoop2 = 2; } provaLoop = provaLoop2; }
Yours,
I think the problem is related to a limitation to only one breakpoint at a time
If you code is in flash, then hardware breakpoints are used. Many older F28x devices only have 2 hardware breakpoints available. Often times the debugger will use breakpoints for other things, further limiting the number of breakpoint resources available for you to use.
When you are out of hardware breakpoint resources, the debugger usually reports it:
https://dev.ti.com/tirex/explore/node?node=A__AFxRAHEqhlcitK5yopkNoA__ccs_devtools__FUz-xrs__LATEST
However, if I set the breakpoint to either line 8 or line 9 and repeatedly press the Resume button, the code does not run, and I do not see the 'provaLoop' variable increase.
Do you get any messages from the debugger when it can't run?
Thanks
ki
None of these messages appear when I use breakpoints. I also tried unchecking the 'Remove CIO function use' (‘Halt at program exit for TI compilers’ was already unchecked), but the problems persisted.
Please provide a small reproducible test case. This includes a complete project, not just example code. That way I can see all your project settings.
You can zip up the project folder and attach it to this thread. If you wish to share privately, you can send via private E2E message to me.