View previous topic :: View next topic |
Author |
Message |
Guest
|
library for MPLAB C18 compiler |
Posted: Wed Feb 09, 2005 1:47 am |
|
|
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
|
|
Posted: Wed Feb 09, 2005 8:52 am |
|
|
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
|
|
Posted: Wed Feb 09, 2005 8:54 am |
|
|
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
|
|
Posted: Tue Sep 06, 2005 8:29 am |
|
|
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
|
|
Posted: Tue Sep 06, 2005 8:40 am |
|
|
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 |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
Posted: Tue Sep 06, 2005 8:50 am |
|
|
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 |
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
|
|
Posted: Tue Sep 06, 2005 8:54 am |
|
|
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 |
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
|
|
Posted: Tue Sep 06, 2005 9:12 am |
|
|
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
|
|
Posted: Tue Sep 06, 2005 9:17 am |
|
|
There's nothing wrong with using the C18 compiler and I don't care which one you use. |
|
|
|