View previous topic :: View next topic |
Author |
Message |
uslimey
Joined: 27 Aug 2011 Posts: 22 Location: Baltimore, MD
|
Debugger Breakpoint Errors |
Posted: Wed Sep 05, 2018 10:05 am |
|
|
I am using a PIC18F67J60... I set break points in my code, run the code, and it either misses the breakpoints or breaks somewhere unrelated. When I look at the break points in the output file (listing), the break points don't align with the input file. Moreover, the debugger stops at different places.
I have spent a week trying to get to the bottom of this. I have rebuilt the entire project. I have also scanned all the source files for illegal characters. I have even uninstalled and reinstalled the PIC C IDE. Nothing I have done will allow the debugger to function the way it is supposed to.
The net result is that I have wasted an inordinate amount of time trying to debug code with a debugger that for whatever reason refuses to stop where I want it to.
Has anyone else experienced this?... Has anyone else found a solution for this?
Let me know.
Thanks,
Steve |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19549
|
|
Posted: Wed Sep 05, 2018 12:25 pm |
|
|
The problem is that if you place breakpoint, it applies 'inside' the function at the selected point. So if it calls a subroutine, you can be inside that routine. If an interrupt executes you will be inside this. The way to get a reliable break is to have an instruction that calls nothing. So something like delay_cycles(1) and break on this. Then barring interrupts you should be where you expect. If interrrupts are enabled you can still find yourself inside these (disable if you want to avoid this). |
|
|
|