Searching \ for '[PIC]: Compiler Wars' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=pic
Search entire site for: 'Compiler Wars'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Compiler Wars'
2001\10\26@102509 by Lawrence Lile

flavicon
face
I've been using the CCS compiler for 5 years, and I am now evaluating the
Hitec C compiler.  You will *NOT* be able to port code at liberty between
these compilers, there are definitely some big differences:

1.  CCS has a lot of handy library functions to access special features of
PICs, such as A/D.  In Hitec, you have to roll your own.  On the other hand,
in Hitec, you know how and why they work. CCS' library functions work most
of the time, not all of the time.

2.  CCS and Hitec do not assign bytes, words, etc in the same way.  In CCS,
a short is one bit, in Hitec a short is 16 bits.  In CCS a long is 16 bits,
in Hitec a Long in 32 bits.  Except for Char, they don't agree about any of
these names.

3. CCS and Hitec implement the printf function in radically different ways.
The short answer is Hitech uses a *LOT* more code to implement this funciton
in a PIC, for various valid reasons.  So you end up never using the printf
function in a PIC with Hitec, because it gobbles up 1K of program memory.

4. Hitec is more strictly ANSI compliant than CCS.  Sometimes this is good,
sometimes not (See #3)

5.  CCS is caps insensitive by default, encouraging bad habits.  Hitec caps
sensitive and you cannot turn it off (grrrrrrr.)

6. Hitec has a reputation of being more stable than CCS.  My experience with
CCS is that of "patch-du-jour".  It is a fact that CCS has issued 51 version
revisions in the last 75 days, and this is modus operandi.  I have had
serious problems with some of their library functions, and ended up rolling
my own.

7. CCS costs $100 for the PCM compiler, plus $100 for the PCB compiler (you
need both), plus $100 each compiler per year for updates, which are
mandatory because the first pair of $100 compilers were fulla bugs, or about
$800 total over three years.  Hitec C costs $850 once.

--Lawrence

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\10\26@105008 by Douglas Butler

flavicon
face
I agree with most of what Lawrence Lile said except:

> 6. Hitec has a reputation of being more stable than CCS.  My
> experience with
> CCS is that of "patch-du-jour".  It is a fact that CCS has
> issued 51 version
> revisions in the last 75 days, and this is modus operandi.

Prior to version 3 CCS was fairly stable.  I am still using v2.693 as it
does everything I need  and I know how to use it.  I have never found a
bug I can't easily work around.

> 7. CCS costs $100 for the PCM compiler, plus $100 for the PCB
> compiler (you
> need both), plus $100 each compiler per year for updates, which are
> mandatory because the first pair of $100 compilers were fulla
> bugs, or about
> $800 total over three years.  Hitec C costs $850 once.

I work with 16C5x parts so I have the PCB compiler.  You only need to
buy both if you are working with a wide variety of PICs.  I don't buy
the updates either.  Instead I buy a new $100 compiler every few years.

When it comes to tools for making a living I would rather have a old
tool that I know REALLY well than a new tool that I am still learning to
use.

Sherpa Doug

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\10\26@110235 by Gerhard Fiedler

flavicon
face
At 09:12 10/26/2001 -0500, Lawrence Lile wrote:
>I've been using the CCS compiler for 5 years

I've been using it for a few months -- probably less than 5 :)

>and I am now evaluating the Hitec C compiler.

... and am ever since using the Hi-Tech compiler. I switched because CCS
simply didn't do it, once an application got a little more complex than
really simple.


>1.  CCS has a lot of handy library functions to access special features of
>PICs, such as A/D.  In Hitec, you have to roll your own.  On the other hand,
>in Hitec, you know how and why they work. CCS' library functions work most
>of the time, not all of the time.

This is one of the things I really don't like in a compiler. I want to know
how the things work and why not if not... Hi-Tech provides the full source
code of all library functions.

>2.  CCS and Hitec do not assign bytes, words, etc in the same way.  In CCS,
>a short is one bit, in Hitec a short is 16 bits.  In CCS a long is 16 bits,
>in Hitec a Long in 32 bits.  Except for Char, they don't agree about any of
>these names.

This is a common problem when working with C (even though CCS is way off
all commonality with C compilers). For this reason, I don't use any of the
built-in types but rather write a header that translates my own types into
whatever they are called by the specific compiler on the specific platform,
something like (for the Hi-Tech compiler):

typedef unsigned char u8;
typedef   signed char i8;
typedef unsigned int  u16;
typedef   signed int  i16;
typedef unsigned long u32;
typedef   signed long i32;

typedef union {
  u16 u16;
  u8  u8[2];
} u16_8;

// ...

>3. CCS and Hitec implement the printf function in radically different ways.
>The short answer is Hitech uses a *LOT* more code to implement this funciton
>in a PIC, for various valid reasons.  So you end up never using the printf
>function in a PIC with Hitec, because it gobbles up 1K of program memory.

This depends a lot on what exactly you do with the printf function. Adding
formatted integer and string output adds something around 500 words. (Using
the "long" option for formatted 32bit numbers adds substantial code, but
you can switch it off.)

>5.  CCS is caps insensitive by default, encouraging bad habits.  Hitec caps
>sensitive and you cannot turn it off (grrrrrrr.)

For me, case-insensitive C is not C... they should call it something else
:)  Once you get used to it, you need it...

>6. Hitec has a reputation of being more stable than CCS.  My experience with
>CCS is that of "patch-du-jour".  It is a fact that CCS has issued 51 version
>revisions in the last 75 days, and this is modus operandi.  I have had
>serious problems with some of their library functions, and ended up rolling
>my own.

This hasn't been differently when I was evaluating it a few years back. It
may be ok as a hobby compiler, but I don't think this is viable in a
production type situation. I want to be chasing my own bugs... ;)

ge

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2001\10\26@111447 by John Craft

flavicon
face
I've been using the htc compiler for a few years after having switched from
the MPLABC compiler.  Even the initial lack of code for the pic peripherals
is now moot with the wealth of shared code on the net.  Clyde and crew have
a great product and it's well worth the price.

John Craft

========================================================
John A. Craft                        Voice: 228-689-8103
Lead Analyst                         Fax:   228-689-8130
Diamond Data Systems
Mississippi Division
MSAAP, Bldg 9101, Ste 105D
Stennis Space Center MS  39529

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.



'[PIC]: Compiler Wars'
2001\11\03@172710 by Edson Brusque
face
flavicon
face
Hello Douglas, Gehrard  et all,

> Prior to version 3 CCS was fairly stable.  I am still using v2.693 as it
> does everything I need  and I know how to use it.  I have never found a
> bug I can't easily work around.

   I'm using CCS PCM v3.050 and it's very stable my v2.7xx programs is
working without any modifications.

   I'm right now downloading v3.058.

>... and am ever since using the Hi-Tech compiler. I switched because CCS
>simply didn't do it, once an application got a little more complex than
>really simple.

   One of my applications is very complex with 97% of the program memory in
a PIC16F877 (8KWords) is being using. It's working without a glitch.

>This is one of the things I really don't like in a compiler. I want to know
>how the things work and why not if not... Hi-Tech provides the full source
>code of all library functions.

   If you don't like the built-in functions, you can write your own. I use
very few of the built-in CCS functions. I've made functions for using A/D,
USARTS, etc. The built-in functions are handy when you need to write
something fast.

>This is a common problem when working with C (even though CCS is way off
>all commonality with C compilers). For this reason, I don't use any of the
>built-in types but rather write a header that translates my own types into
>whatever they are called by the specific compiler on the specific platform,
>something like (for the Hi-Tech compiler):

   Yes, I'm also doing this.

   Best regards,

   Brusque

-----------------------------------
Edson Brusque
Research and Development
C.I.Tronics Lighting Designers Ltda
(47) 323-2138
Blumenau  -  SC  -  Brazil
http://www.citronics.com.br
-----------------------------------

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
[PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads


2001\11\03@185215 by James Caska

picon face
>>This is a common problem when working with C (even though CCS is way off
>>all commonality with C compilers). For this reason, I don't use any of the
>>built-in types but rather write a header that translates my own types into
>>whatever they are called by the specific compiler on the specific
platform,
>>something like (for the Hi-Tech compiler):

>   Yes, I'm also doing this.

How important are standards to compilers do you think?
It seems a common theme for everybody to be writing their own "standard"
headers.

Regards,
James Caska
spam_OUTcaskaTakeThisOuTspamvirtualbreadboard.com
ujVM - 'The worlds smallest java virtual machine'

{Original Message removed}

2001\11\04@052404 by Gerhard Fiedler

flavicon
face
At 10:52 11/04/2001 +1100, James Caska wrote:
>How important are standards to compilers do you think?
>It seems a common theme for everybody to be writing their own "standard"
>headers.

To me, this is a very minor inconvenience and costs very little time to
deal with. I don't think it has a chance to get standardized, because
architectures are too different. In this small micro area, many compilers
don't even adhere to the standards we already have... :)

ge

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2001\11\04@062659 by James Caska

picon face
Gerhard Fiedler wrote,

>To me, this is a very minor inconvenience and costs very little time to
>deal with.

A small convienience for individual projects and code perhaps but in terms
of creating code that can be used by others it would be hard to argue
against standardisation.

>I don't think it has a chance to get standardized, because
>architectures are too different. In this small micro area, many compilers
>don't even adhere to the standards we already have... :)

Sofar this discussion has focused exclusively on C, even on PC's C is rarely
C. Java on the other hand is built on theory.. a standard. I would be
curious to know how many PICSTERS have used java?

jc


{Original Message removed}

More... (looser matching)
- Last day of these posts
- In 2001 , 2002 only
- Today
- New search...