Jump to content
 

xc8 gcc clang


w4gns
 Share

Recommended Posts

Howdy folks

 I was just browsing my xc8 folder and of course in the avr folder I found gcc, which I expected. But when I went through the pic folder I found no gcc which I expected, but I did find clang. I was under the impression xc8 used gcc for pic's also. Has there been a change or am I simply that forgetful.

 

  • Helpful 1
Link to comment
Share on other sites

  • Member

XC8 has never used GCC for PICs. XC16 and XC32 are both based on gcc but XC8 was always based (and is still) on the HiTech compiler which Microchip purchased back in 2009. 

The HiTech compiler had it's own custom front-end and back-end, until v2.x. The most significant change when moving to v2 of XC8 is that the front-end of the compiler was replaced by Clang. This was a great improvement as it brought C99 to the compiler in a much more comprehensive way.  The back-end is still the HiTech compiler back-end.

For backwards compatability you can still set the compiler to C90 mode in which case it will run the old front-end for you to give you more consistent behavior to what you had in the past, but I would really recommend to everyone to use the shiny new Clang based front-end. 

On a different note the support for AVR in XC8 is based on GCC again, so you should as you say find gcc in there.

Link to comment
Share on other sites

  • Member

One more thing to note! The Clang implementation comes with a new standard library implementation which is not nearly as optimized as the HiTech version, so expect your code to be quite a bit bigger! I think we have seen bloat of at least 10% when we tested this, but of course this depends a whole lot on what you are doing exactly.

Link to comment
Share on other sites

  • 1 month later...
  • Member

If you are using cmake why not use xc8 with that and avoid the IDE all together?

The pro version is pretty good, and the free version is good enough to prove concepts and evaluate with.

Besides you can get an evaluation license for the pro version either way...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.

 Share

 


×
×
  • Create New...