Future of the MPLAB C18 compiler?

Thread Starter

spinnaker

Joined Oct 29, 2009
7,830
Can anyone tell me what the future of the C18 compiler is? I thought that I read that it is approaching end of life soon to be replaced by XC8. So I have been trying to teach my self XC8 but had nothing but problems. Issues with breakpoints and the delay function just to name two, of which I will post on separate posts.

I checked the C18 Page and the page makes no mention of end of life for this compiler. I am in stuck in the middle of a project that I wrote in C18. Given all the issues I have been seeing, I would rather just switch back to C18 but don't want to do so if the compiler is going away.

So what is it? I find it strange that they would update a compiler that might be going away soon.
 

BMorse

Joined Sep 26, 2009
2,675
Issues with breakpoints and the delay function just to name two, of which I will post on separate posts.

The MPLABX IDE has issues and bugs still, it will report that the _delay_ms(n) function would be marked as wrong, but it will compile fine and still work.... I have been dabling a bit with the new IDE in Ubuntu, so far so good.... just have to work around the "bugs" to get what you need done....

As for the breakpoints, have not used them yet, I usually do not run my code in debug.....:cool:
 

ErnieM

Joined Apr 24, 2011
8,377
Can anyone tell me what the future of the C18 compiler is?
The Sex Pistols said:
No future, no future,
No future for you
No future, no future,
No future for me
I would rather just switch back to C18 but don't want to do so if the compiler is going away.
Why is that? Dev tools change all the time, especially those by Microchip. I keep all the versions of the compilers (install packages too if I can) installed or safely tucked away. I also store a copy of the app library I use under the main project folder (and compile from it too) so I can guard against new changes breaking old code.

Until I stop hearing so many complaints about C8 I'll start using it for more then the most trivial projects. Otherwise I will stay with tried and true tools such as C18.
 
Last edited:

nsaspook

Joined Aug 27, 2009
13,315
C18 is not EOL, a new revision was just was released and it's still an official product for sale. For the PIC18 it is IMO still the best C for products where stability and predictability are needed during development. Most of what people don't like about C18 are actually pluses for writing C programs on a small 8 bit PIC processor. It's not full C99/ANSI and shouldn't try to be at the expense of software engineering designed for larger systems by using 'fat pointers and defaults that really should be for 16bit+ Von Neumann arch processors..

http://www.microchip.com/stellent/i...E&nodeId=1406&dDocName=en010014&redirects=c18
 
Last edited:

JohnInTX

Joined Jun 26, 2012
4,787
It may be worthwhile to contact an FAE at the local sales office, the numbers are at end of every datasheet, and ask him/her to contact a product manager for C18 to see where its future lies. When XC8 was released, it was supposed to be the be-all-end-all for 8 bit C, combining C18 and HiTech but it did not take long for recommendations to show up saying that current projects should be left in the original compiler especially C18. XC8 has gotten much better in the last revisions so I don't know what they currently say about it. You should give them a jingle and see what they say.

ErnieM is right about development tools 'evolving', and sometimes in a way detrimental to a particular project. I have one dead in the water for just that reason. The HiTech compiler version used has has a pointer bug to high ROM and later versions won't compile the RTOS. Its incompatible with XC8 and C18. That said, like ErnieM, I also keep archives of whatever MPLAB/assembler/compiler that was used for any given project. Its a beating.



For Spinnaker, the post-mortem on your breakpoint issue is here.
 
Last edited:

Ian Rogers

Joined Dec 12, 2012
1,136
I'm kinda lucky... I have been using C18 for years.. But for the smaller chips I was using Hi-tech... The switch to XC8 has been pretty seamless.

The trick is to just make your own libraries... I have built up a pretty good library of code that I can use on both...

I think most people when they try XC8 after C18 are asking the same question... "Where are all the libraries"....

Keep an eye on your version number, it doesn't seem to enumerate correctly... I take XC8 source from the default positions and put a copy in my working directory.. Then all seems to go well.

If you have never been dependant on "Their" code, then you aren't disappointed when they are broke..

I actually get on well with the XC8 compiler now...

(Probably not what you wanted to hear...Sorry)
 
Top