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

cannot compile with new version

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



Joined: 02 Nov 2003
Posts: 18

View user's profile Send private message Visit poster's website

cannot compile with new version
PostPosted: Fri Jun 18, 2004 2:37 pm     Reply with quote

I recently purchased a 1 year maintenance with CCS. My old version was 3.148. Now I am trying to compile code that worked perfectly with 3.148, but doesn't compile with 3.191 or 3.202. I get the error "cannot change device type this far into code". Well, the new compile window seems to be showing that it runs thru several thousand lines of code just to show me an error at the first line of the first included file. I use a header file for every project I do. Look at the following:

Code:

Main Project File
///***********************************************************///
///                    TOKEN MANAGER MAIN                     ///
///***********************************************************///
///                    AUTHOR:  Ed Arnold                     ///
///                   VERSION:  1.31.5                        ///
///              LAST UPDATED:  2/20/04                       ///
///            Copyright(c) E.D.S. 2001-2004                  ///
///***********************************************************///
//>Header files............................................
#include <TM442.h>
#include <ctype.h>
#include <string.h>
#include <bcd.h>
//>Interrupt Service Routines..............................
#include <s_isr.c>
#include <rt_events.c>


Code:

///*********************************************************///
///                   TM 442 HEADER                         ///
///*********************************************************///
///                  AUTHOR:  Ed Arnold                     ///
///                  VERSION:  1.30e                        ///
///             LAST UPDATED:  5/12/03                      ///
///            Copyright(c) EDS 2001-2003                   ///
///*********************************************************///

#include <18C442.h>
#device PIC18C442 *=16<---ERROR HILIGHTS HERE
#fuses HS,NOWDT,NOPROTECT,PUT
#define MHz(x)  x##000000
#use delay(clock=MHz(16))
#priority rda, rtcc
#zero_ram
#define version "1.31"

//OS GLOBALS....................................................................


So, why would this code compile before with no errors and produce this error now.

Thanks,

Ed Arnold
Ed Arnold



Joined: 02 Nov 2003
Posts: 18

View user's profile Send private message Visit poster's website

Problem Solved
PostPosted: Fri Jun 18, 2004 3:24 pm     Reply with quote

Okay, that was easy. The compiler must have seen two #device directives and produced an error. 1 directive was in my header file and the other was in the devices' header file.

Ed Arnold
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