CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug Reports on this forum. Send them to support@ccsinfo.com

breakpoint skip

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Daniel1956



Joined: 31 Jan 2019
Posts: 7

View user's profile Send private message

breakpoint skip
PostPosted: Tue Feb 19, 2019 5:28 pm     Reply with quote

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: 15484

View user's profile Send private message

PostPosted: Wed Feb 20, 2019 1:56 am     Reply with quote

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'.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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