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

Chip runs with ICD=TRUE, but code only compiles without it.

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



Joined: 15 May 2009
Posts: 12

View user's profile Send private message

Chip runs with ICD=TRUE, but code only compiles without it.
PostPosted: Wed Jul 01, 2009 1:47 pm     Reply with quote

Chip: PIC16F886
Compiler Version: 4.095
IDE: MPLAB 8.33

I'm very curious as to the details of what "#fuses ICD=TRUE" does exactly.

When programming with an ICD2, I need "ICD=TRUE" in there or else the chip won't start itself after a power reset. But "ICD=TRUE" also kills me today, because my program that suddenly fit with 8% ROM left, no longer fits when "ICD=TRUE". The routine sizes seem atrociously larger once I put that in.

I believe it's the debugging overhead added to the program, I'd like to take this out because I don't need to step through my program at this point. I've tried "#fuses NODEBUG", but to no avail.

What exactly is going on here?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 01, 2009 1:58 pm     Reply with quote

You want to make it work in Standalone mode.

1. Remove the #device ICD=TRUE statement.
2. Go into the MPLAB Project Build Options menu, and "untick" the
box for "Compile for use with ICD Debugger".
3. Remove the DEBUG fuse from your #fuses statement.
4. Re-compile.
5. Go to the MPLAB Programmer menu (not the Debugger menu)
and connect to the device.
6. Program it from within the Programmer menu (not the Debugger menu).

Quote:
Compiler Version: 4.095
Also, I'm curious about vs. 4.095. The CCS versions page shows
the latest version is 4.093. Also the Updates page shows vs. 4.093.
Do you really have 4.095 ? If so, where have you looked to see the
version number ?
kaz



Joined: 15 May 2009
Posts: 12

View user's profile Send private message

PostPosted: Wed Jul 01, 2009 2:12 pm     Reply with quote

PCM programmer wrote:
You want to make it work in Standalone mode.

2. Go into the MPLAB Project Build Options menu, and "untick" the
box for "Compile for use with ICD Debugger".

Quote:
Compiler Version: 4.095
Also, I'm curious about vs. 4.095. The CCS versions page shows
the latest version is 4.093. Also the Updates page shows vs. 4.093.
Do you really have 4.095 ? If so, where have you looked to see the
version number ?


I may be forgetful. I thought the latest version was 4.096, but remember not having that one. It's actually 4.093 (confirmed with ccsc.exe /v).

I removed ICD=TRUE, that check-box for "Compile for use with ICD Debugger" was already unchecked (which is weird, because I know I've debugged before), and I've put in "#fuses NODEBUG" to ensure that debugging doesn't make it in.

I'm currently using these flags.
Code:
#fuses NODEBUG,INTRC_IO,NOWDT,BROWNOUT,NOFCMEN,NOIESO,MCLR
#device ADC=10
#device ANSI
#use delay(internal=8M)
#use fast_io(B)

Edit: The verification method I'm using is lazy. I'll put in a line or two to blink an LED to make sure it's not a problem with my code. But I'm so very certain it's an odd behavior with debug and ICD.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Jul 01, 2009 2:20 pm     Reply with quote

Post a small but complete "Hello World" program. Confirm that it fails
in your environment.

I'm downloading MPLAB 8.33 now and will duplicate your environment.
But I need a small test program from you. (That compiles without errors).
kaz



Joined: 15 May 2009
Posts: 12

View user's profile Send private message

PostPosted: Wed Jul 01, 2009 2:47 pm     Reply with quote

Bah. Test program worked in stand-alone mode. I guess it really is a problem with the large program. Thanks for your time.

Edit: Suddenly it works? You fixed it! Or more distressingly, the break is still lurking around somewhere.
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