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

library for MPLAB C18 compiler

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








library for MPLAB C18 compiler
PostPosted: Wed Feb 09, 2005 1:47 am     Reply with quote

Good morning
can I compile an object file with CCS C and use the functions into object with C18 compiler? How do I could compile an object file?
Thank's Nino
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Wed Feb 09, 2005 8:52 am     Reply with quote

No
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
rwyoung



Joined: 12 Nov 2003
Posts: 563
Location: Lawrence, KS USA

View user's profile Send private message Send e-mail

PostPosted: Wed Feb 09, 2005 8:54 am     Reply with quote

No but you can rework the source code so that it can be compiled by either compiler.
_________________
Rob Young
The Screw-Up Fairy may just visit you but he has crashed on my couch for the last month!
kupikupi



Joined: 03 Sep 2005
Posts: 31

View user's profile Send private message

PostPosted: Tue Sep 06, 2005 8:29 am     Reply with quote

rwyoung wrote:
No but you can rework the source code so that it can be compiled by either compiler.


how would i do that??? can u teach me ??
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Tue Sep 06, 2005 8:40 am     Reply with quote

kupikupi wrote:
rwyoung wrote:
No but you can rework the source code so that it can be compiled by either compiler.


how would i do that??? can u teach me ??


Sorry, but CCS does not have a linker, so you are stuck with one BIG .c file. (actually, you can have multiple .c files listed at the top of your main .c file, but at this point, don't worry about it). Nor is MPLAB C18's object files compatible with the CCS compiler. Nor will CCS generate any object files for you.

Which compiler are you more familiar with? CCS or MPLAB C18? With 2 1/2 weeks left on your project, you should stick with one compiler, and not worry about how to make your code portable between the two Exclamation
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Sep 06, 2005 8:50 am     Reply with quote

MikeValencia wrote:
kupikupi wrote:
rwyoung wrote:
No but you can rework the source code so that it can be compiled by either compiler.


how would i do that??? can u teach me ??


Sorry, but CCS does not have a linker, so you are stuck with one BIG .c file. (actually, you can have multiple .c files listed at the top of your main .c file, but at this point, don't worry about it). Nor is MPLAB C18's object files compatible with the CCS compiler. Nor will CCS generate any object files for you.

Which compiler are you more familiar with? CCS or MPLAB C18? With 2 1/2 weeks left on your project, you should stick with one compiler, and not worry about how to make your code portable between the two Exclamation

I don't think that is what he is referring to.

C18 gives you the source code. What the orginal poster meant was to take the code and port it to CCS's "C". There isn't that much to change, usually. For most functions, it is a matter of defining the registers and then everything works just fine. The parts that will require more work are those that use pointers to constants since CCS does not allow this. The interrupts are a bit different to but I can't think of a library that uses one of those.

What libraries are you trying to use? CCS has more than the C18 and is easier to use. I am not saying that because I'm a CCS fan. I actually use the C18 for most of my development work.
kupikupi



Joined: 03 Sep 2005
Posts: 31

View user's profile Send private message

PostPosted: Tue Sep 06, 2005 8:54 am     Reply with quote

MikeValencia wrote:
kupikupi wrote:
rwyoung wrote:
No but you can rework the source code so that it can be compiled by either compiler.


how would i do that??? can u teach me ??


Sorry, but CCS does not have a linker, so you are stuck with one BIG .c file. (actually, you can have multiple .c files listed at the top of your main .c file, but at this point, don't worry about it). Nor is MPLAB C18's object files compatible with the CCS compiler. Nor will CCS generate any object files for you.

Which compiler are you more familiar with? CCS or MPLAB C18? With 2 1/2 weeks left on your project, you should stick with one compiler, and not worry about how to make your code portable between the two Exclamation



i have been using MPLAB with C18 compiler all this while ..i just realize that this forum is for ccs compilers.. that's what got me worried... coz i've been doing programs based on the c18 compiler library ... thanx mike for the info ... wonder if u guys could still help me now...
MikeValencia



Joined: 04 Aug 2004
Posts: 238
Location: Chicago

View user's profile Send private message Send e-mail Yahoo Messenger

PostPosted: Tue Sep 06, 2005 9:12 am     Reply with quote

Look at this link:

http://www.ccsinfo.com/demo.shtml

The bad news:
There is a 2K size limit, and you can only use a PIC18F458.

The good news:
The PIC18F458 is very very similiar to the PIC18F452.

The bad news again:
I don't think your project will fit in 2K of ROM, which is the limitation of the demo compiler.

Don't know about your budget, but you can purchase the PCH compiler.
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Sep 06, 2005 9:17 am     Reply with quote

There's nothing wrong with using the C18 compiler and I don't care which one you use.
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