View previous topic :: View next topic |
Author |
Message |
custom_elect
Joined: 15 Dec 2007 Posts: 13
|
Trouble building TCPIP stack with PCD compiler? |
Posted: Mon Aug 02, 2021 7:47 am |
|
|
Does this build without changes? - I am getting hundreds of errors thrown up by "GenericTypeDefs.h" to do with simple identifiers and declarations.
Example:
Executing: "C:\Program files\Picc\CCSC.exe" +FD "Main.c" #__DEBUG=1 +ICD +DF +LN +T +A +M +Z +Y=9 +EA #__PIC24FJ256GA106__=TRUE
*** Error 28 "C:\Proj\9731\CockitTerminals\9731LCD\9731LCD_DZUS\Software\9789WithHDX1100\tcpip\GenericTypeDefs.h" Line 64(22,28): Expecting an identifier
*** Error 43 "C:\Proj\9731\CockitTerminals\9731LCD\9731LCD_DZUS\Software\9789WithHDX1100\tcpip\GenericTypeDefs.h" Line 64(30,31): Expecting a declaration
from this line:
typedef enum _BOOL { FALSE = 0, TRUE } BOOL; /* Undefined size */
It doesn't seem to like FALSE and TRUE.
I was hoping it would just build, out of the box.
Any input gratefully received. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Aug 02, 2021 12:36 pm |
|
|
I was able to get it to compile by #undef'ing TRUE and FALSE as
shown below:
Code: | #include <18F46K22.h>
#fuses NOWDT
#use delay(internal=4M)
#ifdef FALSE
#undef FALSE
#endif
#ifdef TRUE
#undef TRUE
#endif
typedef enum _BOOL { FALSE = 0, TRUE } BOOL;
//=================================
void main()
{
while(TRUE);
}
|
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19498
|
|
Posted: Tue Aug 03, 2021 12:02 am |
|
|
Yes, I hit this years ago.
CCS, in the processor file, has TRUE and FALSE #defined as 0 and 1.
This causes issues with the enum 'definition', used in the GenericTypeDefs
file.
As PCM says all you need to do is undefine them, before you load this
file.
Touch wood, that you don't get too many other problems. I remember
there being a few when I tried this.... |
|
|
|