View previous topic :: View next topic |
Author |
Message |
JerryR
Joined: 07 Feb 2008 Posts: 167
|
Project build issues |
Posted: Tue Jul 26, 2016 2:05 pm |
|
|
I am having a devil of a time building an example from CCS's Embedded Ethernet Exercise book. I know I must have a simple issue because most of my compiler errors are flagged in established h files.
I'm new to using CCS IDE and am trying to get use to it, which may be the issue.
Using PCWH- version 5.021 and attempting to compile code for the PIC18F4620.
Here are a few of my 100 errors generated:
*** Error 38 "J:\AAA_PROJECTS\Dantherm New AC Controller\CCS Files\2016-02-10_tcpip2\tcpip\TCPIP Stack\..\GenericTypeDefs.h" Line 88(28,29): This type can not be qualified with this qualifier
*** Error 28 "J:\AAA_PROJECTS\Dantherm New AC Controller\CCS Files\2016-02-10_tcpip2\tcpip\TCPIP Stack\..\GenericTypeDefs.h" Line 89(28,29): Expecting an identifier
*** Error 38 "J:\AAA_PROJECTS\Dantherm New AC Controller\CCS Files\2016-02-10_tcpip2\tcpip\TCPIP Stack\..\GenericTypeDefs.h" Line 90(30,31): This type can not be qualified with this qualifier
*** Error 38 "J:\AAA_PROJECTS\Dantherm New AC Controller\CCS Files\2016-02-10_tcpip2\tcpip\TCPIP Stack\..\GenericTypeDefs.h" Line 91(30,31): This type can not be qualified with this qualifier
I know that this is a shot in the dark, but can anyone give me a hint on what I'm not seeing here?
I appreciate the group's help. |
|
|
gjs_rsdi
Joined: 06 Feb 2006 Posts: 468 Location: Bali
|
|
Posted: Tue Jul 26, 2016 2:18 pm |
|
|
What you have in lines 27,28,29,30,31?
Best wishes
Joe |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19516
|
|
Posted: Tue Jul 26, 2016 2:19 pm |
|
|
The most likely thing is _order_.
None of the files are capable of compiling on their own, they require lots of stuff setup, and included before they can compile. The odds are you are trying to compile this file before including other things it needs. |
|
|
JerryR
Joined: 07 Feb 2008 Posts: 167
|
|
Posted: Tue Jul 26, 2016 2:26 pm |
|
|
Joe: Good question, see below (see, stupid stuff):
Code: |
typedef signed int16 INT;
typedef signed int8 INT8;
typedef signed int16 INT16;
typedef signed int32 INT32;
|
Ttelmah: I know, but what is the question. The compiler doesn't call out any files not located and the code is as created by CCS.
I'd love to find a project file!
Thanks guys!! |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Jul 26, 2016 5:06 pm |
|
|
Are those four typedef's in the CCS example or did you create that ?
If you want to redefine an 'int' to be 16-bits, CCS has a way to do that:
If you want the normally unsigned variables to become signed, then add
this line after the #include line for your PIC:
|
|
|
JerryR
Joined: 07 Feb 2008 Posts: 167
|
|
Posted: Tue Jul 26, 2016 5:20 pm |
|
|
Hi PCM:
No, CCS wrote this code that seemed to be "thrown" into a directory they sent out with their Embedded Ethernet Development Kit. I'm just trying to build a project that compile from a bunch of code from this directory to make a "exercise" work from their Exercise book.
I attempted to build it from within MPLab unsuccessfully, and now trying to build it from within CCS's IDE. I can't seem to put it all together. There is actually 100 errors, of which, for brevity, I included only four to show how "busted" it is.
Sorry for the drawn-out response. I'm believing that Ttelmah is right; the order is the issue. I just can't get my head around it.
Any suggestions? I'm going to try building it in smaller pieces.
Just trying to incorporate Ethernet into a project here and started with their development kit.
Thanks for your interest! |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19516
|
|
Posted: Wed Jul 27, 2016 12:23 am |
|
|
What is shown, won't work, unless you have #CASE
int (lower case) is already defined. Without #case, the first line translates as:
typedef signed int16 int;
which is trying to change the meaning of the existing int definition.....
Add a #case statement, and all these lines will compile.
You may well find there is a note somewhere saying that all the code is compiled with #case enabled. A lot of professional programmers will default to enabling this. |
|
|
RF_Developer
Joined: 07 Feb 2011 Posts: 839
|
|
Posted: Wed Jul 27, 2016 3:22 am |
|
|
Ttelmah wrote: | You may well find there is a note somewhere saying that all the code is compiled with #case enabled. A lot of professional programmers will default to enabling this. |
Though beware, #case can break CCS supplied examples/drivers as well as old code. So while using it on a new project whcih you are developing from scratch is probably okay (note I don't mean to imply zero effort!), applying across the board will probably result in all sorts of nasties. If code ain't broke don't fix it! "Fixing it" in this instance by forcing case checking. |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19516
|
|
Posted: Wed Jul 27, 2016 3:45 am |
|
|
My guess here is that the TCP/IP example being referred to, was written by somebody used to 'standard' C (99% of C's default to case being enabled), so this was enabled. The lines being posted, can't compile without #CASE, but will compile with it. May well explain 90% of the errors. However as RF_Developer points out, some CCS code does not like #CASE. There is a similar problem if you change the default integer type to 'signed', with quite a few of the standard routines giving problems if this is done. Can make it difficult when switching code between PIC18's and PIC24/30's, where the default type here changes.... |
|
|
JerryR
Joined: 07 Feb 2008 Posts: 167
|
|
Posted: Wed Jul 27, 2016 5:30 am |
|
|
Ttelmah and RF:
Thanks so much for your replies. I believe CCS "adjusted" the code from Microchip C-18 ANSI code. I'm going to wander through the code today to find out what compile before what. My guess is that it will work if built in order.
I've never expected 'simple" when using someone else's code.
Thanks guys! |
|
|
|