Ed Arnold
Joined: 02 Nov 2003 Posts: 18
|
cannot compile with new version |
Posted: Fri Jun 18, 2004 2:37 pm |
|
|
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 |
|