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

Speed up compile time with Libraries

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



Joined: 25 Jan 2011
Posts: 12

View user's profile Send private message

Speed up compile time with Libraries
PostPosted: Mon Apr 30, 2012 2:26 pm     Reply with quote

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?
temtronic



Joined: 01 Jul 2010
Posts: 9221
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Mon Apr 30, 2012 4:47 pm     Reply with quote

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.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Apr 30, 2012 5:07 pm     Reply with quote

I don't have the IDE version of the compiler, but if you do have it, then
this may help. It requires PCW, PCWH, or PCWHD:
http://www.ccsinfo.com/faq.php?page=multi_comp_units
RF_Developer



Joined: 07 Feb 2011
Posts: 839

View user's profile Send private message

PostPosted: Tue May 01, 2012 1:12 am     Reply with quote

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
Tasark



Joined: 25 Jan 2011
Posts: 12

View user's profile Send private message

PostPosted: Wed May 02, 2012 8:13 am     Reply with quote

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
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Wed May 02, 2012 10:13 am     Reply with quote

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.
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