Hello,
I just bought a copy of the CCS PCH compiler to complete a job. I've previously used the Microchip C18 compiler, but my copy is old and does not support the processor I am using.
I am attempting to port code compiled with the Keil C51 / uVision system, that has run successfully on another design of mine using an 8051 variant. It's pretty much ANSI C.
I get errors with a structure declaration:
23 typedef union
24 {
25 int16 value;
26 unsigned char byte[2];
27 }W_UNION;
*** Error 28 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 26(19,20): Expecting an identifier
*** Error 43 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 26(20,21): Expecting a declaration
*** Error 43 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 26(21,22): Expecting a declaration
*** Error 43 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 26(22,23): Expecting a declaration
*** Error 43 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 27(1,2): Expecting a declaration
*** Error 48 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 27(2,9): Expecting a (
This code compiles fine under C51, and BoostC (which I can't use as there is no printf() function).
I hope it's not a case of CCS not allowing arrays or such.
Any ideas?
I just bought a copy of the CCS PCH compiler to complete a job. I've previously used the Microchip C18 compiler, but my copy is old and does not support the processor I am using.
I am attempting to port code compiled with the Keil C51 / uVision system, that has run successfully on another design of mine using an 8051 variant. It's pretty much ANSI C.
I get errors with a structure declaration:
23 typedef union
24 {
25 int16 value;
26 unsigned char byte[2];
27 }W_UNION;
*** Error 28 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 26(19,20): Expecting an identifier
*** Error 43 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 26(20,21): Expecting a declaration
*** Error 43 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 26(21,22): Expecting a declaration
*** Error 43 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 26(22,23): Expecting a declaration
*** Error 43 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 27(1,2): Expecting a declaration
*** Error 48 "C:\C K Enterprises\Minco\MLS\Code\minco.h" Line 27(2,9): Expecting a (
This code compiles fine under C51, and BoostC (which I can't use as there is no printf() function).
I hope it's not a case of CCS not allowing arrays or such.
Any ideas?