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

#INT_RA compiler bug?

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



Joined: 10 Nov 2010
Posts: 3

View user's profile Send private message

#INT_RA compiler bug?
PostPosted: Wed Nov 10, 2010 9:13 pm     Reply with quote

I'm using PCM 4.099 with the PIC16F677. INT_RA is listed in the device header file, but I get a "Invalid Pre-Processor directive" error on the #INT_RA line that is directly ahead of my interrupt service routine. Is this a bug with the compiler? I've used this code successfully with other PIC devices.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 11, 2010 12:29 pm     Reply with quote

It worked for me. I installed vs. 4.099 and compiled the little test program
shown below. I got these results:

Code:

Executing: "C:\Program files\Picc\CCSC.exe" +FM "pcm_test.c" +DF +LY -T -A +M -Z +Y=9 +EA -EW #__16F88=TRUE
      Memory usage:   ROM=4%      RAM=12% - 12%
      0 Errors,  0 Warnings.
Loaded C:\Program Files\PICC\Projects\PCM_Test\pcm_test.cof.
BUILD SUCCEEDED: Thu Nov 11 10:27:47 2010


I'm using vs. 4.099:
Code:
CCS PCM C Compiler, Version 4.099, xxxxx      11-Nov-10 10:27

               Filename: pcm_test.lst

               ROM used: 88 words (4%)
                         Largest free fragment is 1960
               RAM used: 15 (12%) at main() level
                         16 (12%) worst case
               Stack:    1 worst case (0 in main + 1 for interrupts)


Here's the test program:
Code:

#include <16F677.h>
#fuses INTRC_IO,NOWDT,PUT,BROWNOUT
#use delay(clock=4000000)

#int_ra
void ra_isr(void)
{
int8 temp;

temp = input_a();
}

//============================
void main()
{


while(1);
}
shoestingastro



Joined: 10 Nov 2010
Posts: 3

View user's profile Send private message

PostPosted: Thu Nov 11, 2010 7:19 pm     Reply with quote

Thanks for helping out. I cut and pasted your code into a new project, and I still get the same error. I've received a new devices4.dat file from CCS and still have the problem with that as well.

Here's the command line from MPLAB 8.46:
Executing: "C:\Program Files (x86)\PICC\Ccsc.exe" +FM "test2.c" +DF +LN +T +A +M +Z +Y=9 +EA #__16F677=TRUE
*** Error 7 "test2.c" Line 5(0,1): Invalid Pre-Processor directive


Not sure what to try next. Any ideas would be much appreciated.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 11, 2010 10:31 pm     Reply with quote

My suggestion would be to re-install the compiler. I tested it on my
home system with vs. 4.099, and v4.093, and v4.068, and v4.114
and it worked on all of them. Re-install the compiler.
Quote:

Loaded C:\Program Files\PICC\Projects\PCM_Test\pcm_test.cof.
BUILD SUCCEEDED: Thu Nov 11 20:31:04 2010
bkamen



Joined: 07 Jan 2004
Posts: 1615
Location: Central Illinois, USA

View user's profile Send private message

PostPosted: Thu Nov 11, 2010 11:47 pm     Reply with quote

I know this sounds like the Microsoft way -- but completely uninstall your compiler.. and then re-install.

Make sure to save your CRG file.. but delete the directory and all.

-Ben
_________________
Dazed and confused? I don't think so. Just "plain lost" will do. :D
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Fri Nov 12, 2010 1:00 am     Reply with quote

I won't suggest a reinstall before I've seen the original code. It may be a also a trivial syntax error located
before the said #INT_RA line. An error message doesn't always indicate the original problem.
shoestingastro



Joined: 10 Nov 2010
Posts: 3

View user's profile Send private message

PostPosted: Fri Nov 12, 2010 12:07 pm     Reply with quote

I just purchased and installed PCWHD (we needed it anyway to support some future projects) and now it is compiling without error. I don't know if it was the upgrade or the re-install, but life is good now.

Thanks to everyone for your help.
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