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 CCS Technical Support

setting breakpoints in MPLab v7.10 simulator

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







setting breakpoints in MPLab v7.10 simulator
PostPosted: Thu Jun 16, 2005 10:55 am     Reply with quote

Is it possible to set break points in the MPLab simulator - all I get is "one or more breakpoints could not be resolved". It doesn't matter where I put my breakpoint, it can be on the first line! I am using PCM v3.148, which I know does not support .COFF files - could this be the problem?

I want to measure the time between Timer 0 interrupts. I'm sure I could do this on v5.70.4
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Jun 16, 2005 11:23 am     Reply with quote

I installed PCM vs. 3.148 and compiled the simple program below.
In the Project/Build Options menu in MPLAB 7.10, I picked
"Expanded COD format" in the Debug options.
In the Debugger menu, I selected MPLAB Sim as the Tool.

I could set breakpoints on any of those lines in the while() loop,
and then select Debugger/Run, and it always stopped on the
correct line.

Code:
#include <16F877.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)

//===================
void main()
{
int8 a,b,c;

while(1)
  {
   a++;
   b = a + 1;
   c = a + b;
  }

}
Guest
Guest







setting breakpoints in MPLab v7.10 simulator - continued
PostPosted: Thu Jun 16, 2005 2:36 pm     Reply with quote

PCM programmer wrote:

I installed PCM vs. 3.148 and compiled the simple program below.
In the Project/Build Options menu in MPLAB 7.10, I picked
"Expanded COD format" in the Debug options.
In the Debugger menu, I selected MPLAB Sim as the Tool.

I could set breakpoints on any of those lines in the while() loop,
and then select Debugger/Run, and it always stopped on the
correct line.


Thanks PCM for your input.
I tried your code - and yes it works with each of the three build options selected? Interestingly, although MPLab complains about the .COFF file not being loaded, it does actually stop! Now I am really confused as CCS told me that v3.148 doesn't generate COFF files - hence the error message? I also noticed that when using the .COFF option, the 'watch' window does not get updated, but it does when the other two build options are selected?

OK I ran my code using all three options in the build menu - with the following results.
None - no break point reached.
Expanded COD format - no break point reached.
COFF format - stopped on break point?

My code is a bit more extensive than was posted, in that I have 2 separate .C files #included, along with my custom .h file. I will need to experiment further, and will report back with the results.
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