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

Trouble building TCPIP stack with PCD compiler?

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



Joined: 15 Dec 2007
Posts: 13

View user's profile Send private message

Trouble building TCPIP stack with PCD compiler?
PostPosted: Mon Aug 02, 2021 7:47 am     Reply with quote

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

View user's profile Send private message

PostPosted: Mon Aug 02, 2021 12:36 pm     Reply with quote

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: 19520

View user's profile Send private message

PostPosted: Tue Aug 03, 2021 12:02 am     Reply with quote

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....
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