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

Is the CCS compiler unique?

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







Is the CCS compiler unique?
PostPosted: Mon Feb 11, 2008 2:37 pm     Reply with quote

Hi all!

Right now I am programming a PIC18 and my project has a character LCD and RS232. Later I plan to add a graphics LCD, network interface etc. So I think I'll have to switch to a more powerful 32 bit microcontroller like Coldfire or ARM.
I am just interested if any compilers for Coldfire etc. out there feature the same nice built-in functions for setting up the microcontroller modules (e.g. SPI) like the CCS compiler does for the PIC. I know there is also a GNU C compiler for those architectures but I doubt that this compiler offers such built in functions or am I wrong?

Best regards,
Zer0flag
Storic



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

View user's profile Send private message Send e-mail

PostPosted: Mon Feb 11, 2008 3:13 pm     Reply with quote

microchip have brought out a 32 bit micro Smile
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=2591&link=TodaysFeatures

Uses MIPS M4K Core - 72MHz, 32-bit M4K core capable of a best in class 1.5 DMIPS/MHz.

I am sure in time CCS would have develop their compiler to suit with all the tools. Wink
http://www.ccsinfo.com/newsdesk_info.php?newsPath=ALL&newsdesk_id=87
_________________
What has been learnt if you make the same mistake? Wink
Zer0flag
Guest







PostPosted: Tue Feb 12, 2008 2:33 am     Reply with quote

I think at this point of time the PIC32 cannot be compared to a Coldfire, without even talking about silicon errata etc.

Storic wrote:
microchip have brought out a 32 bit micro Smile
Storic



Joined: 03 Dec 2005
Posts: 182
Location: Australia SA

View user's profile Send private message Send e-mail

PostPosted: Tue Feb 12, 2008 5:28 am     Reply with quote

I am not going to disagree, just showing option for a MIPS 32 that would possible work under CCS compiler in the future giving you as you said

"the same nice built-in functions for setting up the micro controller modules (e.g. SPI) like the CCS compiler does for the PIC."

To be confirmed by CCS Confused
_________________
What has been learnt if you make the same mistake? Wink
Guest








PostPosted: Wed Feb 13, 2008 2:58 am     Reply with quote

Thank you Storic. I just wondered if there are no other "intelligent" compilers out there like the CCS ;) Maybe CodeWarrior for ColdFire?

Storic wrote:
I am not going to disagree, just showing option for a MIPS 32 that would possible work under CCS compiler in the future giving you as you said

"the same nice built-in functions for setting up the micro controller modules (e.g. SPI) like the CCS compiler does for the PIC."

To be confirmed by CCS Confused
Bob Sacamano



Joined: 17 Jan 2008
Posts: 16
Location: Somewhere Cold, USA

View user's profile Send private message

PostPosted: Wed Feb 13, 2008 8:09 am     Reply with quote

CodeWarrior for ColdFire processors does not have the level of built-in functionality that CCS does.

Their Device Initialization is more complete and easier to use than the CCS Project Wizard.

There are NO built-in functions. I was a CCS user for about a year and a half and then switched to CW for CF. I was definitely "spoiled" by the in-built CCS functions. CCS may have its flaws but I've not seen any other product like it.

FWIW, I also wouldn't hold my breath for the PIC32 compiler.
_________________
"And you want to be my latex salesman."
Franck26



Joined: 29 Dec 2007
Posts: 122
Location: Ireland

View user's profile Send private message

PostPosted: Wed Feb 13, 2008 1:44 pm     Reply with quote

Hi,
I was using Code Warrior, and there is an automatic code generator: Processor Expert.
For me, it's more efficient than the CCS "built-in functionality" in the way that the C source of the function are visible, so you can use it later if you have to change the compiler or the micro family...
Zer0flag
Guest







PostPosted: Thu Feb 14, 2008 4:06 am     Reply with quote

Thank you all for the comments, they were really helpful.

Zer0
RLScott



Joined: 10 Jul 2007
Posts: 465

View user's profile Send private message

PostPosted: Thu Feb 14, 2008 6:18 am     Reply with quote

Bob Sacamano wrote:
...I was definitely "spoiled" by the in-built CCS functions. ...


On the other hand, I have used the CCS compiler for many projects and I have never used the built-in functions (except the ultra-simple ones like bit_set(), bit_clear(), and bit_test() which map to single instructions). I think they hide too much from the user and limit flexibility. The hardware documentation for the PICs is precise. You should understand the SFRs bit by bit. I don't even let the CCS parse my interrupts for me. I always use #INT GLOBAL and parse them myself. That way I know what is going on and my interrupt overhead is a minimum.

Robert Scott
Ypsilanti, Michigan
Zer0flag
Guest







PostPosted: Fri Feb 15, 2008 6:27 am     Reply with quote

You are right RLScott. Setting everything bit by bit is the best way to make your software comply with the PICs datasheet. On the other hand if you are not an expert this can also mix up a lot of things.
Another story: I had to switch from a PIC16 to a PIC18. Changing the software to run on the new PIC took only one day because I had used the built-in functions.

RLScott wrote:

On the other hand, I have used the CCS compiler for many projects and I have never used the built-in functions
Douglas Kennedy



Joined: 07 Sep 2003
Posts: 755
Location: Florida

View user's profile Send private message AIM Address

PostPosted: Fri Feb 15, 2008 7:52 am     Reply with quote

The choice between detail ( bit level coding) and convenience ( built in functions) is neither obvious in its detail and never convenient. Now if you are going to trust CCS to compile C syntax then arguably you should trust them with their built in functions as well. Time is money and if everyone duplicated a hypothetically perfected built in CCS function then arguably it is overall inefficient on the basis that if it doesn't need to be done then don't do it. Now portability is another matter. There is the holy grail approach in which standard code that is easily understood by all is written and is universally portable.
This quest is elusive and the those who set sail on it are often wrecked on the rocks of special processor features. A narrower version of the grail is to consider code universally portable by the coder who wrote it. This often involves a unique personal trek into the nooks and crannies of processor features that maybe others can't follow without duplicating the effort. This leave nothing unknown to the coder approach fits well with those who need to know the number of blades on the jet engine compressor before they book a flight. Most like the built in functionality of flying and are willing to risk their lives for its added convenience. If you paid CCS for the convenience of built in function using them makes more sense.
Zer0flag
Guest







PostPosted: Fri Feb 15, 2008 8:51 am     Reply with quote

I think with more complex systems the choice is even harder. On a PIC one can choose between using assembler, C and in the case of CCS using the built-in functions of CCS or not.
For a complex system and a more powerful processor and a graphics GUI one has to choose whether to use a free compiler like GCC or to buy a compiler, whether to use an RTOS or not, what TCP/IP stack to use, and so on. One can use free tools but this will probably mean a lot of time spent learning to use them and there is also some uncertainty if the parts will fit together at all.
One can also choose to use a complete environment like QNX which has compiler, RTOS, GUI etc. that fit together. On the other hand this will probably cost a lot of money just to start with and license fees have to be paid.
IMHO the choice is really hard...
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