go_away

Author Topic: What's the problem with MPLAB and C18 compiler for PIC ?  (Read 4025 times)

0 Members and 1 Guest are viewing this topic.

Offline RebelgiumTopic starter

  • Supreme Robot
  • *****
  • Posts: 638
  • Helpful? 0
  • It's called the future ... We like it here
What's the problem with MPLAB and C18 compiler for PIC ?
« on: November 06, 2008, 02:09:06 PM »
Title sais it all.
I hear people complain about the PIC compilers (that they're not free etc.) but you can download MPLAB for free and a student edition of the C18 compiler for free.
I know the C18 compiler is 60 days limited, but now my C18 compiler has been limited for 30 days and I haven't even noticed it... It still compiles like it used to.
To relax after some hard work on robotics: A very fun free online text based MMORPG
orgcrime.net

Offline Half Shell

  • Robot Overlord
  • ****
  • Posts: 225
  • Helpful? 0
Re: What's the problem with MPLAB and C18 compiler for PIC ?
« Reply #1 on: November 06, 2008, 02:41:53 PM »
What Microchip does with their C30 compiler (which I've been learning of late) is turn off loop optimization after the trial period is up. Most of the other functionalities are fairly straightforward and still work fine. The C18 compiler is still doing the same thing.

My main personal beef with Microchip is their horrific windows-only software, odd driver support, and sometimes incredibly iffy hardware setup steps. Not to mention incredibly steep learning curves and hard-to-approach documentation.

Offline ArcMan

  • Supreme Robot
  • *****
  • Posts: 519
  • Helpful? 4
  • Mmmm... Plasma
Re: What's the problem with MPLAB and C18 compiler for PIC ?
« Reply #2 on: November 06, 2008, 02:57:38 PM »
I did read about them turning off loop optimizations after 60 days after someone pointed out that the C18 compiler was free.
Can you tell me what that means?
I've been programming in C for 20 years.  I just don't know what loop optimizations are, exactly.

Offline Half Shell

  • Robot Overlord
  • ****
  • Posts: 225
  • Helpful? 0
Re: What's the problem with MPLAB and C18 compiler for PIC ?
« Reply #3 on: November 06, 2008, 05:41:08 PM »
I did read about them turning off loop optimizations after 60 days after someone pointed out that the C18 compiler was free.
Can you tell me what that means?
I've been programming in C for 20 years.  I just don't know what loop optimizations are, exactly.


This essentially means you don't need it. You are really not losing that much functionality for the most part-  I've never once missed having the optimization, and I think few people on these boards work with embedded systems complicated enough to actually warrant the use of them.

Offline paulstreats

  • Supreme Robot
  • *****
  • Posts: 1,381
  • Helpful? 21
Re: What's the problem with MPLAB and C18 compiler for PIC ?
« Reply #4 on: November 06, 2008, 06:35:47 PM »
From a hobbyists point of view, the imposed limitations are not sufficient to compian about. Even working professionally, if you didnt want to pay for it then you could optimise your code yourself. Just put a bit more thought into it or even add in your own assembly. (yes the free license also allows for commercial development)

 The free c compilers were really a big breakthrough for pic's, before this the only free compilers used to limit the amount of code you used, limit the amount of devices you could use, and also limit the amount of onboard ram you could use.

 The reason is that pic16's were never made for c programming and their limited command set made it extremely difficult to use from a c compilers perspective. The pic18's are the same pin for pin as pic 16's only with an advanced instruction set allowing for c compilers. There are also some extra features becoming available like usb support.

 The only thing that there is to comlain about is that not enough people realise that by moving to pic 18's, 24's and 32's that there are compilers for free. Anybody who has looked into pic16's and seen the outrageous cost of a hobby compiler should really look at pic18's.

Also mplab offer full code simulation, allowing you to watch output pins, simulate pin stimulus, monitor all of the registers (including the return stack), and also show how much code space and memory your program is going to take up, allow you to animate your c code and see the assembly code working in a seperate window. FOR FREE

Offline CrashOverron

  • Jr. Member
  • **
  • Posts: 22
  • Helpful? 0
Re: What's the problem with MPLAB and C18 compiler for PIC ?
« Reply #5 on: November 06, 2008, 08:01:57 PM »
thank you for the very elaborate reply paulstreats =]]

Offline RebelgiumTopic starter

  • Supreme Robot
  • *****
  • Posts: 638
  • Helpful? 0
  • It's called the future ... We like it here
Re: What's the problem with MPLAB and C18 compiler for PIC ?
« Reply #6 on: November 07, 2008, 12:15:57 PM »
That's what I thought.
Thanks for the info guys.

So I'm sticking with PICs for sure :D
To relax after some hard work on robotics: A very fun free online text based MMORPG
orgcrime.net

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,663
  • Helpful? 169
    • Society of Robots
Re: What's the problem with MPLAB and C18 compiler for PIC ?
« Reply #7 on: November 09, 2008, 01:15:19 AM »
Just an FYI, I have optimization turned off by default for the Axon and the $50 Robot. Unless you need to do some super faster processing or have memory constraint issues, optimization isn't very helpful.


Another complaint about MPLAB (well, actually most C compilers for embedded electronics) is that it doesn't follow the rules of standard C in the compiler. I don't know about the most current versions, but the older ones definitely didn't.

Offline Half Shell

  • Robot Overlord
  • ****
  • Posts: 225
  • Helpful? 0
Re: What's the problem with MPLAB and C18 compiler for PIC ?
« Reply #8 on: November 09, 2008, 10:53:09 AM »
Another complaint about MPLAB (well, actually most C compilers for embedded electronics) is that it doesn't follow the rules of standard C in the compiler. I don't know about the most current versions, but the older ones definitely didn't.

Still true, and still VERY annoying. Another one of the many reasons PICs have such a ridiculous learning curve.

 


Get Your Ad Here