Jump to content

Boostc And Hi-tech C Comparison?


Recommended Posts

Sorry for the one-man flood at the moment! You can tell I'm rather enthusiastic!

 

When I first looked into BoostC (a year or two ago), I remember reading something about how it compared with Hi-Tech 'C'. I've searched this site, and Googled, and can find no useful information. It seems to have gone.

 

I would like find out what benefits BoostC has over the ubiquitous Hi-Tech 'C', especially now that Hi-Tech 'C' has been taken over by Microchip and will no doubt get a pretty serious level of support.

 

Is there a feature comparison list somewhere? If not, your own opinions on the strengths and weaknesses of the two products would be great.

 

Thanks again for tolerating all this traffic!

 

Steve

Link to post
Share on other sites

Ah, sorry, I've found it.

 

In case anyone else is interested, there is a pretty good comparison page here:

 

http://www.ccsinfo.com/content.php?page=newcompilercomp

 

Obviously it's trying to sell the CCS compiler, but it looks like a useful, detailed and fair comparison of seven different PIC 'C' compilers.

 

Steve

 

FORUM OWNER: Please feel free to close this topic. I'm sorry to have opened it in error.

Edited by Thack
Link to post
Share on other sites
Ah, sorry, I've found it.

 

In case anyone else is interested, there is a pretty good comparison page here:

 

http://www.ccsinfo.com/content.php?page=newcompilercomp

 

Obviously it's trying to sell the CCS compiler, but it looks like a useful, detailed and fair comparison of seven different PIC 'C' compilers.

 

Steve

 

FORUM OWNER: Please feel free to close this topic. I'm sorry to have opened it in error.

 

This comparison looks good except that some of their facts about BoostC are just plain wrong. Especially performance metrics. And it's not only about BoostC. I wonder how Hi-Tech could end up generating code 2.5 times bigger than CCS.

 

Regards,

Pavel

Link to post
Share on other sites
This comparison looks good except that some of their facts about BoostC are just plain wrong. Especially performance metrics.

 

Well, come on then, tell us which facts are wrong!

 

Obviously the table will get out of date as all the products get developed. But it would great to hear which bits you know to be wrong - please tell us.

 

Perhaps we could compile a list and get CCS to update the table. That would be an enormous benefit for SourceBoost.

 

Steve

Link to post
Share on other sites
This comparison looks good except that some of their facts about BoostC are just plain wrong. Especially performance metrics.

 

Well, come on then, tell us which facts are wrong!

 

Obviously the table will get out of date as all the products get developed. But it would great to hear which bits you know to be wrong - please tell us.

 

Perhaps we could compile a list and get CCS to update the table. That would be an enormous benefit for SourceBoost.

 

Steve

 

OK here are a few: Data Types, Extended Compiler Control Directives, Recursion, ISR, Can Locate C Data in Non-RAM Memory, Example Programs/Drivers, Automatic Packing of Bit Variables, Dynamic RS232 Library, Ext Device Drivers, Benchmarks.

 

They don't provide code used for their benchmark section so it's impossible to verify their figures.

 

Regards,

Pavel

Link to post
Share on other sites
OK here are a few: Data Types, Extended Compiler Control Directives, Recursion, ISR, Can Locate C Data in Non-RAM Memory, Example Programs/Drivers, Automatic Packing of Bit Variables, Dynamic RS232 Library, Ext Device Drivers, Benchmarks.

 

They don't provide code used for their benchmark section so it's impossible to verify their figures.

 

 

If you could be specific about what the correct information should be for the items you list above, I'd be very happy to get in touch with CCS and try to persuade them to update their table.

 

Let's be honest: ALL of those tables will gradually get out of date as the various manufacturers develop and upgrade their products, so they must be used to amending them.

 

And I agree completely - without the source code the benchmarks are pretty meaningless, but I think most people will realise that.

 

Pavel - please publish the correct information for your list of items in this thread, and I'll do my best to get the information to CCS.

 

Steve

Link to post
Share on other sites

A couple of months back I was looking for a C compiler option. Previously I've been coding in assembly using MPLab and they are getting tedious to code and maintain.

 

The first I tried was Hi-Tech C, based on what I surmised on the internet that it seems to be the most respected one. I haven't the budget to try their professional version, but their lite (free) version generates horribly inefficient code. Even if I get the expensive professional version (which should theoretically removed those inefficiencies), it only supports up to PIC16, which doesn't helps me in the long run. Microchip's PIC18 C compiler is also terribly expensive by the way.

 

I was thinking of giving up looking for a C compiler and maybe even considering writing a simple one of my own when by chance I found this SourceBoost. To my surprise the code generated by SourceBoost is actually very good, and you get support for both PIC16 and PIC18 at a cheaper price. There's still some kinks to work out here and there, but I can get around them.

Link to post
Share on other sites
...

OK here are a few: ..., Recursion, ...

 

Wait, BoostC supports recursion??? Could have fooled me. I've never been able to get it to work. What's your trick?

 

I thought the way the stack worked on a PIC made recursion pretty much impossible.

 

Regards,

Henry

Link to post
Share on other sites
...

OK here are a few: ..., Recursion, ...

 

Wait, BoostC supports recursion??? Could have fooled me. I've never been able to get it to work. What's your trick?

 

I thought the way the stack worked on a PIC made recursion pretty much impossible.

 

Regards,

Henry

 

Yes BoostC supports recursive calls. This support is very limited but it does exist. (It took me a while to put yes against this item). Generally speaking functions that have no arguments and don't corrupt their locals can be called recursively:

#include <system.h>

unsigned int f = 1;

unsigned int factorial( unsigned char n )
{
if( 1 == n )
 return 1;
f *= n;
return factorial( n - 1 ); 
}

void main()
{
factorial( 4 );  //after this call global variable 'f' will contain factorial of 4
while( 1 );
}

 

Regards,

Pavel

Link to post
Share on other sites
  • 1 month later...

I work for a company that makes restaurant appliances, and nearly every one has a PIC-based control board (in some cases as many as 3 per board!). Over the past few years we have used CCS, Hitech and most recently BoostC. I will not address any competitive comparisons, but will give information based on actual use. CCS: (1) Handles interrupts very poorly. It does not support dual priority interrupts. It has a lot of overhead and isr's are handled one-per-call to the interrupt routine. (2) Bugs in integer and floating point math. You cannot do add/subtract with a negative result in the same source code line as a multiply/divide and come up with a correct answer. (3) Very poor code efficiency. Hitech: (1) Math problems similar to CCS, plus printf with floating point may simply lockup and require the watchdog to bark. (2) One of our customers wrote their own code using v 8.35 and it was working. They "upgraded" to 9.40 and the code hung on some internal library function that couldn't be fixed. They went back to 8.35. (3) I tried their newest (9.63) on some other working 8.35 code and ran out of ROM space. (4) Their use of "psects" as part of their linking mechanism is "well documented" as to what it is - but not a single sentence on what to do when you get this error. (5) Microchips purchase of Hitech has simply raised the price without any improvements. Microchips C18: We have not used this for any projects, mostly because of what looks like poor code efficiency (every variable access begins with setting the BSR!).

 

We have completed a couple of small projects with BoostC with no noticeable issues. I am about to do another one of those 3-chip systems and will be using BoostC. There are a few things I need to "work around" but so far these are minor. Code efficiency "appears" on-par with Hitech (8.35 anyway).

 

In summary, from the real world, don't waste your time/money on CCS or Hitech.

 

PS: Wish list: (1) bit fields, (2) deeper struct/union nesting, (3) better error messaging. I *Love* your function overloading!

Link to post
Share on other sites

jim, that's awesome feedback, thanks. I'm close to getting some paying projects for PIC programming, and I've been very pleased with the boostC product, especially the useful simulation tools you can get for $20, but your comment gives me more confidence in the compiled output. I may yet fork out for the commercial licence. My few peeves are mainly with the IDE and some of its conventions, and that you can't yet do full simulation including A/D for newer ICs.

 

What IDE are you using? The whole sourceboost thing or another IDE and just the command-line boostC compiler?

 

Thanks,

 

ken

Link to post
Share on other sites

Me Too :rolleyes:

Thank Jim, that is.

 

The SourceBoost simulator needs a *LOT* of work, mostly in its plugins.

It has the potential to be better than MPLAB Sim, but limitations like only one instance of each plugin (I have a hack for the LED Block one :)) mean I only use it for quick and dirty testing. It is not YET worth setting up a complicated set of plugin assignments, as one usually runs into some limitation before enough of the circuit is simulated.

 

I often end up debugging in MPLAB Sim, (possibly influenced by my need to use MPLAB for the PICkit 2 debugger) and there one can 'fake' ADC support with a stimulus file. Once you are in MPLAB, one tends to do small edits andf rebuild without leaving it, but it tends to be somewhat unstable so I prefer the SourceBoost IDE.

 

This is not the place for a SourceBoost IDE or compiler wishlist but if a plugin could be written to hook the simulator to a SPICE package or similar general purpose analog circuit simulator, Dave and Pavel would have a world-beating development environment. Owing to the open plugin interface its more likely to happen here than with the competitors.

Link to post
Share on other sites
Me Too :rolleyes:

Thank Jim, that is.

 

The SourceBoost simulator needs a *LOT* of work, mostly in its plugins.

It has the potential to be better than MPLAB Sim, but limitations like only one instance of each plugin (I have a hack for the LED Block one :)) mean I only use it for quick and dirty testing. It is not YET worth setting up a complicated set of plugin assignments, as one usually runs into some limitation before enough of the circuit is simulated.

 

I often end up debugging in MPLAB Sim, (possibly influenced by my need to use MPLAB for the PICkit 2 debugger) and there one can 'fake' ADC support with a stimulus file. Once you are in MPLAB, one tends to do small edits andf rebuild without leaving it, but it tends to be somewhat unstable so I prefer the SourceBoost IDE.

 

This is not the place for a SourceBoost IDE or compiler wishlist but if a plugin could be written to hook the simulator to a SPICE package or similar general purpose analog circuit simulator, Dave and Pavel would have a world-beating development environment. Owing to the open plugin interface its more likely to happen here than with the competitors.

 

Well if they have a time/resource constraint, I would prefer they concentrate on getting a compiler for the 24bit device.

Regards

Raghunathan

Link to post
Share on other sites
Well if they have a time/resource constraint, I would prefer they concentrate on getting a compiler for the 24bit device.

Regards

Raghunathan

 

I would be *very* surprised if they went up against Microchip C30. As it is open source under a GNU licence, *anyone* can modify it to remove the Microchip licence manager restriction. The result cannot be legally used with Microchip's includes and libraries but a 'clean room' rewrite of them is a far smaller task than a whole compiler. As a number of the more rabid open source supporters are pissed off with Microchip, expect a fully open unrestricted C30 derivative sooner rather than later. Also the architecture has very little in common with the PIC16 and PIC18 series so Dave and Pavel's existing codebase would need a lot of rewriting.

 

It doesn't make sense to invest time and money in developing a PIC24 or dsPIC compiler unless you can throw many man-hours at it each day and be early to market and be set up to service the rapid response contract support market. If you are not very fast on your feet, someone will get a free compiler out or under cut your target price before your launch date so you cant recover your investment when you get it to market.

 

A small team like Sourceboost would have to drop *everything* else and work something like 18 hours a day 6 days a week to get a PIC24 compiler out fast enough. I really don't see it happening unless someone contracts them to develop it for Loadsa Dosh. . . .

Link to post
Share on other sites
jim, that's awesome feedback, thanks. I'm close to getting some paying projects for PIC programming, and I've been very pleased with the boostC product, especially the useful simulation tools you can get for $20, but your comment gives me more confidence in the compiled output. I may yet fork out for the commercial licence. My few peeves are mainly with the IDE and some of its conventions, and that you can't yet do full simulation including A/D for newer ICs.

 

What IDE are you using? The whole sourceboost thing or another IDE and just the command-line boostC compiler?

 

Thanks,

 

ken

 

I have never had any good reason to use a simulation tool. I prefer to get a PC board made and jump into it. We have a commercial license at work and I have the personal one at home. Keep in mind that Microchip is all about selling silicon - code efficiency to keep costs down is NOT one of their goals but it is one of mine! We had a meeting in engineering today and basically "outlawed" any further use of ccs or hitech.

 

As for which IDE, I use MPLAB so I can download to my PC board via USB. For compiling, I use an old Borland Make utility run from inside my editor (PSPad). When I'm happy with the compile/link, I just import into MPLAB and proceed with burn & learn. Actually, since most projects have either a display or serial/I2C port, we usually send debug data out as appropriate.

Link to post
Share on other sites
As for which IDE, I use MPLAB so I can download to my PC board via USB. For compiling, I use an old Borland Make utility run from inside my editor (PSPad). When I'm happy with the compile/link, I just import into MPLAB and proceed with burn & learn. Actually, since most projects have either a display or serial/I2C port, we usually send debug data out as appropriate.

 

Thanks for the info. I found the simulation to be helpful especially when on the learning curve, and I still use it when possible to do the initial tests.

 

I'm slowly acquiring or making test boards for the few PICs I'm interested in, so I expect to do more 'direct to silicon' development with my Pickit2 soon.

Link to post
Share on other sites

More comparisons for a limited task (Storing bytes in a Long) Here:

Microchip Forum: Putting "unsigned char" in a "unsigned long"

 

We come out very well evaluating a complicated expression, :) but suffer on pointer handling and if the expression is broken up with a temporary result. :wacko:

Edited by IanM
Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...