View previous topic :: View next topic |
Author |
Message |
sjb
Joined: 13 Apr 2010 Posts: 34 Location: UK
|
compile + link |
Posted: Sun Apr 25, 2010 7:02 pm |
|
|
Does anyone separately compile their .c files to object files then link, or do most people just #include all the .c file in a main module (which I gather is the traditional CCS way)?
I'm having problems with the first method and I'm wondering if I'm swimming against the CCS way of doing things. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Apr 26, 2010 12:33 pm |
|
|
Many of us don't own the CCS IDE compiler. We use the command line
compilers with MPLAB. So we don't have the option of using multiple
compilation units. We always use the #include method.
Just letting you know why you're not getting a lot of immediate answers. |
|
|
sjb
Joined: 13 Apr 2010 Posts: 34 Location: UK
|
|
Posted: Mon Apr 26, 2010 3:29 pm |
|
|
PCM programmer wrote: | Many of us don't own the CCS IDE compiler. We use the command line
compilers with MPLAB. So we don't have the option of using multiple
compilation units. We always use the #include method. |
I've tried using MPLAB with the command line tools as well as with the CCS IDE. Both methods will support multiple compilation units (the option is there if you want to use it, I believe). I just can't get it work properly, especially the fuses.
The 'normal' way to build a c program for me (and I had though for most c programmers too) is to divide a project in to small compilation units, each with a .c file. So I was rather surprised to find CCS users do it different.
I'm coming to ccs from (too) many years experience with other compilers (good and bad). I'd love to get ccs working with multiple compilation units as that feels much more natural for me (and the manual says its possible). It would also allow me to share code between projects much more easily.
Steven |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Mon Apr 26, 2010 3:36 pm |
|
|
Quote: |
Both methods will support multiple compilation units (the option is there if
you want to use it, I believe). |
The option to use MPLAB with multiple compilation units is there, but only
if you buy the full CCS IDE compiler, not with the CCS command line
compilers. See this post from Darren Rook:
http://www.ccsinfo.com/forum/viewtopic.php?t=26954&start=10
CCS has a FAQ page on multiple compilation units, with sample project
files. Maybe it can give you some help:
http://www.ccsinfo.com/faq.php?page=multi_comp_units |
|
|
sjb
Joined: 13 Apr 2010 Posts: 34 Location: UK
|
|
Posted: Mon Apr 26, 2010 3:52 pm |
|
|
PCM programmer wrote: | Quote: |
Both methods will support multiple compilation units (the option is there if
you want to use it, I believe). |
The option to use MPLAB with multiple compilation units is there, but only
if you buy the full CCS IDE compiler, not with the CCS command line
compilers. See this post from Darren Rook:
http://www.ccsinfo.com/forum/viewtopic.php?t=26954&start=10 |
Oh! That was not obvious. |
|
|
|