View previous topic :: View next topic |
Author |
Message |
nolfese
Joined: 11 Apr 2009 Posts: 2
|
.o Object file creation |
Posted: Sun Apr 12, 2009 1:22 pm |
|
|
I've never really bothered about what the linker does, I've just written code in CCS or Hi-Tech C and then blown the hex file into the PICs. I now fine myself in the position of wanting to combine pre-compiled library files using the linker. I'm pretty sure that this should be possible using the linker command line facility like this:
mplink 18f452.lkr main.o funct.o math.lib /m main.map /o main.out
The trouble is that when I compile I don't see any .o files being generated. The .hex file is there and works fine. how can there not be a .o file as well?
Thanks for any help you can offer. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
nolfese
Joined: 11 Apr 2009 Posts: 2
|
|
Posted: Tue Apr 14, 2009 1:59 am |
|
|
Hi PCM Programmer,
You had me going for the moment there, I thought we on track for a winner. I've now tried building all in the PCW IDE V4.084 but still no .o file. The Options/Project Options/Output Files dialog lists 8 bit hex as the object file and yet it refuses to write it. How weird is that? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Apr 14, 2009 1:21 pm |
|
|
I don't have the CCS IDE so I can't duplicate your problem, but there is
a screenshot in the CCS manual that shows a tickbox for "Multiple
compilation units". Make sure that tickbox is selected. |
|
|
BoydNielsen
Joined: 20 Aug 2006 Posts: 12
|
.o Object file creation |
Posted: Mon Aug 03, 2009 3:08 pm |
|
|
I too would like to create some separate .o "object files" (want to put some of those special drivers into a library). I know that in MPLAB it can be done with the C18 and C30 compilers by navigating to Project > Build Option... > Project > MPASM/C17/C18 Suite tab [or ASM30/C30 Suite tab] and selecting "Build library target". However, I can't figure out how to do it with the CCS compiler (either in the CCS IDE or the MPLAB IDE).
Within the CCS IDE, when I navigate to Options > Project Options and then select Multiple Compilation Units and Link Separately, all I get is one .o file (the first compilation unit).
Any ideas as to what I am doing wrong?
Boyd |
|
|
|