View previous topic :: View next topic |
Author |
Message |
Tasark
Joined: 25 Jan 2011 Posts: 12
|
Speed up compile time with Libraries |
Posted: Mon Apr 30, 2012 2:26 pm |
|
|
I have a 50k+ project and it takes around 1 - 2 minutes to compile. Which is a huge burden each time I make a very small change. I'm looking at ways of reducing this time.
Is there a way to compile most of my code into a library and include this pre-compiled library so it doesn't get compiled each and every time? I see plenty of solutions for microchip and hitech compiler but not for CCS. Is this possible with CCS? |
|
![](templates/subSilver/images/spacer.gif) |
temtronic
Joined: 01 Jul 2010 Posts: 9172 Location: Greensville,Ontario
|
|
Posted: Mon Apr 30, 2012 4:47 pm |
|
|
2 minutes is a huge burden?? Man, that's a blink of the eye to me. Try toggling in a boot loader, that allows a papertape reader to load the 'real' bootloader, that then allows you to load the real program of about 8kb.That's 10-15 minutes providing you don't screwup the toggling in of the bootloader.Yup, times have changed since the mid 70s for sure....
Ok, speedup can be had by getting a faster PC(might cost you $400 tops),trashing ALL software except the commandline version of the compiler.That means getting rid of Windows,internet access,virus programs,etc. If you have to have Windows install a very,very 'lean' version.Again NOTHING else but the compiler.Get rid of everything else.
This 'engineering PC' should have nothing else. |
|
![](templates/subSilver/images/spacer.gif) |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
![](templates/subSilver/images/spacer.gif) |
RF_Developer
Joined: 07 Feb 2011 Posts: 839
|
|
Posted: Tue May 01, 2012 1:12 am |
|
|
CCS doesn't have a linker. Therefore there cannot be any pre-compiled libraries. An obvious conclusion follows from that.
How are you arranging your workspace? Is it local to your machine. My (prettry big) projects compile in maybe 10-15s locally, but I'm currently forced by company policy to compile from a network drive and then compiles lengthen to one to two minutes. A pain, but not a disaster as its still within my attention span. I moan about it - mainly as I want to set up a decent source management system - but its not too great a pain.
If your workspace is not local then I've found its not the compiling per se, its the writing of the output, particularly the listing and tree files, that really takes the time.
RF Developer |
|
![](templates/subSilver/images/spacer.gif) |
Tasark
Joined: 25 Jan 2011 Posts: 12
|
|
Posted: Wed May 02, 2012 8:13 am |
|
|
Thanks RF_Developer that's what I was looking for, whether or not CCS had a linker or not. So it seems we can not create pre-compiled libraries like microchip can.
My project is locally compiling 50k+ lines in over a minute. Perhaps computer performance is to blame for the slow speeds. Thanks for the tips |
|
![](templates/subSilver/images/spacer.gif) |
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
|
|
Posted: Wed May 02, 2012 10:13 am |
|
|
Well it is true that a linker could speed up the compile but the other major use is that the linkable code is frozen and assuming it is written well it can be compatible with any new changes in the code that will be compiled. Now this frozen code feature can also be achieved with a source code naming convention for versioning that via the #include binds the chosen version of a subsystem into the compile. CCS ( build all ) compiling is very very fast ( a dozen seconds ) so there is little overhead to this approach. The advantage to the CCS approach is that if there are issues with the what could be linkable subsystems the compile will flag them and avoid a run time issue. |
|
![](templates/subSilver/images/spacer.gif) |
|