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 support@ccsinfo.com

Using Microchip source code

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







Using Microchip source code
PostPosted: Fri Sep 14, 2007 12:18 pm     Reply with quote

I am interested in using a C source file from Microchip to implement a TCP/IP stack. Their app note says it's written for the C18 and Hi-Tech PICC 18 compilers. I'm guessing that these compilers are case sensitive, as every other C compiler in the world is, except for CCS. Am I asking for trouble to try to use this C library with CCS? Are there other options I'm not aware of?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Sep 14, 2007 12:25 pm     Reply with quote

I'm guessing that these compilers are case sensitive, as every other C
compiler in the world is, except for CCS.

Download the CCS compiler manual.
http://www.ccsinfo.com/downloads/CReferenceManual.pdf

Look in the Preprocessor Directives section, specifically at
the Compiler control section.

You will find the directive to do what you need.
SeeCwriter
Guest







PostPosted: Fri Sep 14, 2007 12:33 pm     Reply with quote

I know that you can configure the CCS compiler to be case sensitive. But the manual also says that none of the CCS libraries have been tested in case-sensitive mode, so proceed at your own risk. I have no desire to debug CCS's libraries.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Fri Sep 14, 2007 1:05 pm     Reply with quote

By "libraries" they mean the C source files in:
Quote:
c:\Program Files\Picc\Examples
c:\Program Files\Picc\Drivers

Those files aren't involved in compiling code that has been ported
from C18.
SeeCwriter
Guest







PostPosted: Wed Sep 19, 2007 1:51 pm     Reply with quote

The documentation says that case sensitivity is not tested with example programs, drivers, and headers. I believe headers are compiled into your code.

I saw on the CCS download page a download for TCP/IP. I downloaded it and read the readme file, and it says that it's a port of the Microchip TCP/IP package for the version 3 CCS compiler. It also says that when version 4 of the CCS compiler is released (I guess this port is quite old) that the Microchip TCP/IP package will be able to be used almost "as is" with it since version 4 will have a linker and compatible pointers. Has anyone tried to use Microchip's TCP/IP package with version 4 of the CCS compiler?
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Sep 19, 2007 2:06 pm     Reply with quote

I just looked at 18F452.H and almost everything in it is a constant, and
they are all in upper case, which is the C standard.
There are few #define statements which provide aliases for functions,
but they're all in lower case, which is also the C standard.
These two lines could conceivably be a problem, but these are the only ones:
Code:
#define BYTE int
#define BOOLEAN short int


Quote:
I saw on the CCS download page a download for TCP/IP.

Here's the link to the download page. I don't see a TCP/IP download
on there. What page did you see it on ?
http://www.ccsinfo.com/downloads.php
SeeCwriter
Guest







PostPosted: Wed Sep 19, 2007 2:09 pm     Reply with quote

Click on the "Go to the Compiler Updates page" link.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Sep 19, 2007 4:28 pm     Reply with quote

I downloaded it. I did a text search, and Darren does use #case in
these files. I did a further search for "stacktsk.h", and it looks like
almost every file in TCP-IP directory #includes it. So that means
#case is likely used everywhere in that code.
Quote:
c:\program files\picc\tcp-ip\pic examples source\tcpip\stacktsk.h
Line 51: #case

c:\program files\picc\tcp-ip\pic examples source\fat\fat_pic.c
Line 63: #case

c:\program files\picc\tcp-ip\pic examples source\fat\fat_spi.c
Line 66: #case
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