|
|
View previous topic :: View next topic |
Author |
Message |
Daniel1956
Joined: 31 Jan 2019 Posts: 7 Location: Quebec
|
breakpoint skip |
Posted: Tue Feb 19, 2019 5:28 pm |
|
|
I've got a problem with debug, where it skips my breakpoint in my code.
I've deactivated global interrupts,
I don't use goto.
I use pic16F1789 with CCS compiler V 5.070.
Any ideas about a possible cause?
Thanks in advance for the help.
Daniel |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19496
|
|
Posted: Wed Feb 20, 2019 1:56 am |
|
|
What IDE?. What actual debugging tool?. Is the code actually running?.
Not reaching a breakpoint can be caused by several things:
1) Most chips only support a limited number of breakpoints. There is a
warning if this is exceeded, but this can be disabled. Extra breakpoints
then won't work.
2) Chip could be watchdog restarting, so not reaching breakpoints.
3) The IDE will sometimes fail to properly load the debug executive
can be caused by just a little extra capacitance on the lines. The
programming used to write this is slightly different from normal programming
so an error is not given, but this then stops all of the executive from
working correctly (this one is a real b&*&ard).
4) MPLAB-X can sometimes get itself 'hiccuped'. A full restart, recompile
and reprogram will usually fix this. Have not seen the same with the CCS,
IDE but it does sometimes give some lesser oddities that a restart clears.
5) If using MPLAB-X, clear the cache. 'help' - > 'about' tells you where
this is. Corrupted values in here can stop the IDE from working right.
6) Sometimes code lines do not actually have corresponding code. So
a breakpoint cannot actually be generated to them. Normally the IDE
will warn if it can't resolve the line, but again this can be turned off.
It is often easier to generate a deliberate 'nop' line to be the target
of a breakpoint. So add a line:
delay_cycles(1);
to your code, and break on this. Makes sure there is actually code there
for the IDE to generate a break 'on'. |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|