Author Topic: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"  (Read 72777 times)

0 Members and 1 Guest are viewing this topic.

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26751
  • Country: nl
    • NCT Developments
Rather then to push it off as some kind of evil malfeasance, could it not just be the fact that the 'free version' just lacks or turns off all compiler optimization functions, and the for fee pro version allows for enabling the various optimization options.
It has always been clearly stated that the free version has limited optimizations, it's only crazy people that claim they're intentionally sabotaging their own compiler.
IMHO its crazy people use controllers for which no good free compiler is available. The last time I used a commercial compiler was 20 years ago. And even that one was given away for free by the distributor selling the controllers. A free 'crippled' compiler is just a gold plated turd.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline AndersAnd

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: dk
https://en.wikipedia.org/wiki/Microchip_Technology#HI-TECH_Software
Quote
HI-TECH Software

HI-TECH Software is an Australian-based company that provides ANSI C compilers and development tools. Founded in 1984, the company is best known for its HI-TECH C PRO compilers with whole-program compilation technology, or Omniscient Code Generation (OCG).[14][15] HI-TECH Software was bought by Microchip on 20 February 2009,[16] whereupon it refocused its development effort exclusively on supporting Microchip products.[17]

Supported manufacturers and architectures

    Microchip Technology PIC10, PIC12, PIC14, PIC16, PIC18, PIC24, PIC32 and dsPIC

HI-TECH Software has also provided compilers for the following manufacturers and architectures, but none of them are advertised since the Microchip acquisition:

    Cypress Semiconductor PSoC
    Silicon Laboratories
    8051
    Z80 for CP/M [18] and Z80 cross compiler.

http://electronicdesign.com/embedded/whole-program-c-compiler-optimizes-across-modules
Quote
Whole Program C Compiler Optimizes Across Modules
Apr 27, 2007 William Wong | Electronic Design

Splitting applications into small modules is critical to building a manageable application, but most development systems only optimize code within a module. HiTech Software's new crop of PICC-18 PRO C compilers and linkers cross this boundary and do optimization by looking at the entire program. This can be especially critical for optimizations like dead code elimination, register parameters, and inlining. It allows the system to use information in one module to optimize how another is used.

The resulting optimization when looking at the whole program can be significant. Hi-Tech's approach can often cut a program's size by 50%. Often, this is the result of leaving out unnecessary code. For example, the commonly used print function can format text for everything from characters to double-precision floating point. Significant savings are possible if the latter isn't required. Hi-Tech's approach can detect what parameters are used and eliminate the unneeded code. Pricing starts at $1195.

www.htsoft.com

Hi-Tech Omniscient Code Generation whitepaper: http://www.htsoft.com/news/070309_Whitepaper-OmniscientCodeGeneration_FINAL.pdf
Omniscient Code Generation
A whole-program compilation technology for superior code density and performance
by Clyde Stubbs
CEO and Founder, HI-TECH Software
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Quote
its crazy people use controllers for which no good free compiler is available.

Yeah. That's why I never hire good programmers who are not free, :)

If you need an example of people going against their self-interest, you need to look no further.
================================
https://dannyelectronics.wordpress.com/
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26751
  • Country: nl
    • NCT Developments
Quote
its crazy people use controllers for which no good free compiler is available.

Yeah. That's why I never hire good programmers who are not free, :)

If you need an example of people going against their self-interest, you need to look no further.
So Microchip should make money from their compiler and not their chips? Even the FPGA vendors are giving away their development tools for free. Why is Microchip so far behind?
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1993
  • Country: us
    • netstuff
it could just be that the company is slow to change and realize what is a cost center and what is a profit center.

not every company can admit that things have changed and change themselves, internally, to support it.

I would like to not care, at some point, what family of chip I use.  I'd really like all my tools to be gcc-based so that I don't have to keep relearning stuff needlessly.  or at the very least, similar enough and without any 'funny stuff' going on.  if that ever happens, I'll start to consider other vendors and their chips in my designs and builds.  (again, all DIY based and targeted, not meant for high count production runs).

Offline andyturk

  • Frequent Contributor
  • **
  • Posts: 895
  • Country: us
IMHO its crazy people use controllers for which no good free compiler is available. The last time I used a commercial compiler was 20 years ago. And even that one was given away for free by the distributor selling the controllers. A free 'crippled' compiler is just a gold plated turd.
This.
 

Offline jaxbird

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
Joining a bit late, but anyway, the op article is of course severely flawed and written by someone who didn't spend more than 60 minutes with mplab back in 2011. And didn't bother to check whether his complaints were factual or not.

Anyway, MPLAB (X) today still isn't great, I think mostly due to their mistake of choosing the poor and outdated Java platform. It's a memory hog and very slow. I'm sure they can do better than that.

But all in all, it does work and it does the job once you get used to it. The PICKIT3 is still a bit wonky though, if you want to work with their older 8 bit devices etc, better make sure you still have a PICKIT2 around.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Even the FPGA vendors are giving away their development tools for free.
Unless it's changed recently, you still have to pay if you want to use the newest and largest devices.

Anyway, MPLAB (X) today still isn't great, I think mostly due to their mistake of choosing the poor and outdated Java platform. It's a memory hog and very slow.
That's more a problem with Netbeans than Java. There's plenty of well-performing Java software.

Offline jaxbird

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
...
That's more a problem with Netbeans than Java. There's plenty of well-performing Java software.

You are probably right, but still Netbeans is primarily Java, so same thing to me :)

Sun did nice C innovations with Java but didn't win the battle.

Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Quote
So Microchip should make money from their compiler and not their chips?

Microchip should make money from whatever they like. None of my business or your business how they make money; I only care at end of the day if they offer me value for my money.

Quote
Even the FPGA vendors are giving away their development tools for free.

Not sure what "the FPGA vendors" you are referring to. But plenty of them charge plenty of money for their development tools. You would know this if you did even superficial amount of work on FPGA.

Quote
Why is Microchip so far behind?

Following the herd is the strategy one takes if one cannot think for themselves.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Quote
I'd really like all my tools to be gcc-based so that I don't have to keep relearning stuff needlessly.

Two ways to get you there:

1) make yourself the center of the universe;
2) if that doesn't work, write your own gcc-based compilers.

If 2) doesn't work out for you, pray that somebody else does it for you.

Insisting that others do it for you doesn't get you anywhere, unless 1) is true.
================================
https://dannyelectronics.wordpress.com/
 

Offline Rufus

  • Super Contributor
  • ***
  • Posts: 2095
So Microchip should make money from their compiler and not their chips? Even the FPGA vendors are giving away their development tools for free. Why is Microchip so far behind?

The Microchip compilers used to be cheap. About $500 for a perpetual license, support, and updates.

After the Hi-Tech acquisition they got more expensive, with an obnoxious licensing and activation scheme and a 'High Priority Access' support subscription that no one knows what you get for paying it other than free major updates of where there hasn't been one so far.

This idiocy seems to have been inherited from Hi-Tech, it really feels like who ever was responsible at Hi-Tech for the Microchip acquisition (which scrapped all Hi-Tech products except the two 8 bit Microchip compilers) is in charge of the compiler department at Microchip.
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
(which scrapped all Hi-Tech products except the two 8 bit Microchip compilers)

Yeah, didn't HiTech make compiler for other platforms to?, what happened to those?
 

Offline jaxbird

  • Frequent Contributor
  • **
  • Posts: 778
  • Country: 00
IMO one of Microchips strong points is that you can easily and cheaply get really old chips from them.

And of course they do have total domination on the 16 bit segment. Nothing I know of can compete with their PIC24 series in 16 bits price/performance.



Analog Discovery Projects: http://www.thestuffmade.com
Youtube random project videos: https://www.youtube.com/user/TheStuffMade
 

Offline gocemk

  • Regular Contributor
  • *
  • Posts: 84
  • Country: mk
Quote
I'd really like all my tools to be gcc-based so that I don't have to keep relearning stuff needlessly.

Two ways to get you there:

1) make yourself the center of the universe;
2) if that doesn't work, write your own gcc-based compilers.

If 2) doesn't work out for you, pray that somebody else does it for you.

Insisting that others do it for you doesn't get you anywhere, unless 1) is true.
:-DD  :-DD  :-DD  :-DD  :-DD  :-DD
 :clap:
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1993
  • Country: us
    • netstuff
that's bullshit.

I'm not going to waste any time WRITING a tool FOR some damned vendor.  fark that!  if the vendor does not want to compete, fine, I will use the other guy.

the whole compiler MESS with mcp just turns me off and since there are cleaner solutions for me, I will go with them.  its just that simple, folks.  make the tools work smooth for me and I'll consider your hardware products.  make the tools harder and less standard (compared to what many users already are familiar with and trained on) and you get less of our business.

its one reason cisco eats everyone else's lunch.  the training base is there on cisco gear (as an example) and once people are trained on a tool set, they tend to want to keep using that set.

Online mariush

  • Super Contributor
  • ***
  • Posts: 4982
  • Country: ro
  • .
The tools work smooth and the compiler is as standard as it can be, and it is free and good.  You're just throwing a hissy-fit because you don't get the best/"ultimate" version of the compiler.

The IDE is free, it's good, it's based on Netbeans so it can be easily improved by third party developers.. the compiler works just fine.

At the end of the day, if you're making a product that sells in tens of thousands or several products, you're not going to care about a one-time fee of $1000, the cost of the premium version.  If you make something that sells in 10k and by using the premium version you can reduce the size of your code to fit into a PIC that costs 10 pennies less in volume, then you've basically recuperated the money for the compiler.

If you're a hobbyist, you can use the free version and if you find it produces too "loose" code, you can either choose a bigger sized PIC chip (there's loads of choices) or use a third party compiler.. you have MikroC (about 249$), CCS (command line compilers starting from only $50!)... you don't HAVE to pay $1000 to get the absolute smallest code or most efficient one out there.
 
You have CHOICES. 

Same as with Atmel chips (AVR) ... you have the free gcc based compiler which may or may not be the best, but you can also pay 1500$ for Crossworks for AVR or 200$ for MikroBasic PRO for AVR or other AVR solutions... or anything in between.
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Quote
the whole compiler MESS with mcp just turns me off

Or you just cannot handle it.

Quote
make the tools work smooth for me and I'll consider your hardware products. 

A little bit too much self-importance? I don't think they care about you, or even have heard of you there.

Quote
they tend to want to keep using that set.

I guess that's why CISCO is losing market share fast, :)
================================
https://dannyelectronics.wordpress.com/
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1993
  • Country: us
    • netstuff
why do you keep insisting on trying to make this about 'me' ?

clearly, there are others who feel the same way I do.  we don't want to have a separate compiler for each damned product or chip.  that is not sensible and if you don't -have- to deal with a different tool chain, why should you?

its just that simple, danny.  and please, stop with the attempt to personalize this.  its not a very good argument style and its not appreciated, ok?

Online mariush

  • Super Contributor
  • ***
  • Posts: 4982
  • Country: ro
  • .
Why do you say "we"? You're not the spokesperson of anyone here.  It's just your opinion.

You don't have a separate compiler for each damned product or chip. Microchip has a compiler for all 8 bit microcontrollers, one for all their 16 bit microcontrollers and one for all of their 32 bit microcontrollers.

I don't want one compiler for everything... the old expression Jack of all trades, master of none is perfectly valid here.

Microchip sells a product, and makes everything clear. If you don't like a product you don't have to purchase it. You're free to express your opinion, but that doesn't mean your opinion is correct.
 

Offline linux-works

  • Super Contributor
  • ***
  • Posts: 1993
  • Country: us
    • netstuff
yes, *microchip* may have compilers for their chips, but if I cross into another company, then I have to use different compilers, linkers, debuggers, etc?

getting back to the arduino vs microchip comparison, the arduino chip 'family' makes use of tools that are already installed or very easily installed on our systems.  for any linux user, it could not be easier (apt-get install arduino).  no dumbed down versions to worry about, no upgrade troubles (apt-get will keep your apps updated), always staying at a reasonably current version and ability to install freely anywhere you want, even built from source.  there is no such analog in the mcp world (is there?).  and so, for an opensource hw/sw person, the gcc and apt-get way is the path of least resistance and just the obvious choice if I had to choose between this and some very custom vendor-specific set of compiler tools.

note, I'm not crediting atmel, necessarily, for any of this and I'm not necessarily blaming microchip.  I'm simply saying that if I'm doing open source development, the first thing I'd choose is the standard easy toolchain that is free in every sense of the word and has quite usable performance, both as a tool and as generated output code.  for open source projects, its rare that an atmel or arduino-compatible chip isn't enough to solve your controller problem.  if you need more power, many will jump right up to an embedded linux board of some kind and skip all middle steps (these days, those linux boards are arm chips).

that covers the spectrum for embedded use.  atmel 'open' chips for low end and linux single board small systems for stuff that goes between the lower end and full blown unix hosts.

Online mariush

  • Super Contributor
  • ***
  • Posts: 4982
  • Country: ro
  • .
So by your reasoning, if I make a revolutionary 8bit microcontroller tomorrow, I shouldn't sell it or people shouldn't use it simply because linux distributions don't have ready make packages for beginners like you, or because gcc doesn't support yet this revolutionary architecture?

The 8bit PICs are a different architecture, with various quirks and differences that makes it very difficult for someone to adapt gcc to compile binaries to this architecture.  GCC simply isn't capable of compiling code for it now, just as I'm sure there's lots of other 4bit and 8bit and x bit microcontrollers that gcc doesn't support.  GCC isn't the "ultimate" compiler out there.

Quote
for any linux user, it could not be easier (apt-get install arduino).  no dumbed down versions to worry about, no upgrade troubles (apt-get will keep your apps updated), always staying at a reasonably current version and ability to install freely anywhere you want, even built from source.  there is no such analog in the mcp world (is there?).  and so, for an opensource hw/sw person, the gcc and apt-get way is the path of least resistance and just the obvious choice if I had to choose between this and some very custom vendor-specific set of compiler tools.

Yeah, let's settle on the most generic compiler out there, that makes the most generic binary, that has the most average optimizations, every microcontroller should work the same because you're too lazy to actually download some source code and compile it to a binary and install it with provided scripts. Every chip manufacturer shouldn't do something innovative that may just make their chips not compatible with the plain boring generic gcc or some other open source chain because user linux-works won't be able to say apt-get install arduino anymore.

Quote
yes, *microchip* may have compilers for their chips, but if I cross into another company, then I have to use different compilers, linkers, debuggers, etc?
Why does this surprise you?  You may have to. It all depends on the architecture of those chips, and how well those architectures are suited for what's out there, for open source compilers, linkers, debuggers.
If Microchip doesn't have the man hours to contribute to gcc to make something happen, if people all over the world don't contribute to gcc to make it happen, you have no choice. gcc doesn't make itself, people contribute code to it

Also, lots of these small lightweight microcontrollers are cheap and simple, universal/standard features like JTAG to debug and program would make the die of the chip too large and potentially make the chips commercially un-viable. See for example PIC10F200, which has only 6pin and 384 bytes of program space... you seriously expect something like this to have universal debugging or some other silliness?  GCC is so big and optimized for bigger architectures with more registers and memory that it couldn't even compile something considering the restrictions of such a chip.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2797
  • Country: au
I use MPLAB X as well as Atmel Studio and find overall they are both ok.  There are things that I don't like about each, but they are not show stoppers.  I simply use the (free) tools and get on with the job at hand.   :)
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
I like mikroC although its stupid at times:

Code: [Select]
;MyProject.c,11 ::                 digits[0] = digits[1] = digits [2] = '0';
0x0018        0x3030              MOVLW      48
0x0019        0x00F3              MOVWF      R1+2
0x001A        0x3030              MOVLW      48     ; No need
0x001B        0x00F2              MOVWF      R1+1
0x001C        0x3030              MOVLW      48    ; No need
0x001D        0x00F1              MOVWF      R1
vs MPLAB X
Code: [Select]
93:                   digits[0] = digits[1] = digits [2] = '0';
0016  3030     MOVLW 0x30
0017  00F7     MOVWF 0x77
0018  00F6     MOVWF 0x76
0019  00F4     MOVWF 0x74     ; no need
001A  0874     MOVF 0x74, W   ; no need
001B  00F5     MOVWF digits

Although MPLAB X is stupid too:
Code: [Select]
95:                      digits[2]++;
0020  3001     MOVLW 0x1
0021  00F4     MOVWF 0x74     ; no need
0022  0874     MOVF 0x74, W  ; no need
0023  07F7     ADDWF 0x77, F
vs mikroC
Code: [Select]
;MyProject.c,13 ::                 digits[2]++;
0x0022        0x0AF3              INCF       R1+2, 1

Seems like MPLAB X doesn't know the PIC12 can do increments so it does it the hard way and putting those extra moves  :-//

but mikroC can be retarded too:
Code: [Select]
;MyProject.c,22 ::                 digits[0] += in_val;
0x002E        0x0842              MOVF       main_in_val_L0, 0
0x002F        0x0771              ADDWF      R1, 0
0x0030        0x00F0              MOVWF      R0
0x0031        0x0870              MOVF       R0, 0
0x0032        0x00F1              MOVWF      R1
sure I'm using index 0 of the array, so why doesn't it know it's the first element instead of doing the superfluous indexing?

The thing is compilers are not that great, they waste space and cycles, nothing new there since they keep producing versions that are 10% better than the previous one, meaning they are not close to be ideal by any standard.

Best compiler out there is the Intel one, but that's for x86 systems and they are still improving it.
For big projects C++/C is a necessary evil, you couldn't cope doing it all in assembly. but for PIC12 you do have a choice, assembly is really not that hard and PIC12's branching is as hard and unintuitive as any mcu assembly can be.
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Quote
why do you keep insisting on trying to make this about 'me' ?

Because you are participating in this conversation? Tough to have a conversation with people who aren't here.

Quote
we don't want to ...

We? Who is "we"? When did you appoint yourself the spokesperson for other people?

Quote
...have a separate compiler for each damned product or chip. 

That's a great way to kill innovation - including your beloved avr.


================================
https://dannyelectronics.wordpress.com/
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf