View previous topic :: View next topic |
Author |
Message |
Zer0flag Guest
|
Is the CCS compiler unique? |
Posted: Mon Feb 11, 2008 2:37 pm |
|
|
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
|
|
|
Zer0flag Guest
|
|
Posted: Tue Feb 12, 2008 2:33 am |
|
|
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 |
|
|
|
Storic
Joined: 03 Dec 2005 Posts: 182 Location: Australia SA
|
|
Posted: Tue Feb 12, 2008 5:28 am |
|
|
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 _________________ What has been learnt if you make the same mistake? |
|
|
Guest
|
|
Posted: Wed Feb 13, 2008 2:58 am |
|
|
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 |
|
|
|
Bob Sacamano
Joined: 17 Jan 2008 Posts: 16 Location: Somewhere Cold, USA
|
|
Posted: Wed Feb 13, 2008 8:09 am |
|
|
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
|
|
Posted: Wed Feb 13, 2008 1:44 pm |
|
|
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
|
|
Posted: Thu Feb 14, 2008 4:06 am |
|
|
Thank you all for the comments, they were really helpful.
Zer0 |
|
|
RLScott
Joined: 10 Jul 2007 Posts: 465
|
|
Posted: Thu Feb 14, 2008 6:18 am |
|
|
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
|
|
Posted: Fri Feb 15, 2008 6:27 am |
|
|
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
|
|
Posted: Fri Feb 15, 2008 7:52 am |
|
|
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
|
|
Posted: Fri Feb 15, 2008 8:51 am |
|
|
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... |
|
|
|