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

0 Members and 1 Guest are viewing this topic.

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #75 on: April 30, 2014, 09:09:27 pm »
Quote
Useless in the way that an compiler fills the resulting code with instructions that does not belong there, just to fill up already tight memoryspace, if you pay $999 you get an option that does not add that code.

So your BMW is useless because my Ferrari gets to the supermarket 0.2 second faster, :)

Being able to tell the difference between "less useful" and "useless" may be useful.

of course, what I mean like,is that I guess you wouldn't like if Ferrari put an lada carburettor in your Ferrari so i would go lot slower, and make you pay a lot to make it work as it should :)
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #76 on: April 30, 2014, 09:13:18 pm »
Quote
it seems like microchip is removing parts if this "extracode"/fillercode..

Newer XC8 is actually quite respectable. I did a benchmark of dhrystone on pic18, among other mcus. The XC8 free is on par with PICC18 pro, and XC8 pro is about 20% faster than PICC18 pro. I don't recall exactly which version of XC8 I used (could be 1.21).

Good to know, i have been compiling some small stuff, and when the compiler advertises to me and tell me how much more space I would have if I had the Pro version, I get kinda sad.. but I found the cure for it, so I'm in the clear. Didn't find any tool to disassemble the compiled code yet to see how it is, but I don't get those advertisements.
But according to how microchip people answers when they are asked, I guess they aren't going to keep it like this forever.
I'm on to 1.31 of XC8..
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #77 on: April 30, 2014, 09:23:04 pm »
Quote
you wouldn't like if Ferrari put an lada carburettor in your Ferrari

I would actually love to get a Ferrari with a Lada engine in it, as long as I pay the Lada price.

Considering how ***much*** you paid for the free version, you should be happy too, :)
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #78 on: April 30, 2014, 09:25:39 pm »
Quote
so likely a small community hangs around it.

Absolutely true.

To that frog sitting at the bottom of a well, the universe sure looks like the size of a pizza, :)

It is perfectly OK for that frog to think that. If a human thinks like that too, s/he in big trouble.
================================
https://dannyelectronics.wordpress.com/
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #79 on: April 30, 2014, 09:30:06 pm »

Sure, look at dangerousprototypes. It's the complete opposite of hackaday in that sense, as it features many PIC related projects. It's mainly the blog hosts there (Ian and other designers) use PICs , so likely a small community hangs around it.

And all projects popping up at Tindie, lately I have been observing lot of very interresting projects using pics, more than avr, where most of the projects are around the ardiuno platform.
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #80 on: April 30, 2014, 09:33:42 pm »
Quote
you wouldn't like if Ferrari put an lada carburettor in your Ferrari

I would actually love to get a Ferrari with a Lada engine in it, as long as I pay the Lada price.

Considering how ***much*** you paid for the free version, you should be happy too, :)

Yeah, after my recent find, I'm more than happy :)
My initial post was just linking to the article others wrote about, and an person who did do disassembly, and mentioned in his conclusion that it looks like microchip are removing some of the things from the free-version. Hi-Tech had its reasons for this, and those was ok, since they were doing business on the compilers, not the silicon.
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #81 on: April 30, 2014, 10:45:07 pm »
Quote
since they were doing business on the compilers, not the silicon.

I would be less focused on what they didn't offer for free. Instead, I would focus on what they did offer for free.

Microchip (or any other vendor) is not in the business of offering anyone high performance compilers for free. They are in the business of making money. You should be grateful that you offered you an opportunity to use their compilers for free, albeit with reduced performance.

Demanding them to give to you a high performance product for free would be a charity demanding that you give all of your bank accounts to it, after you have donated $20.
================================
https://dannyelectronics.wordpress.com/
 

Offline scientist

  • Frequent Contributor
  • **
  • !
  • Posts: 317
  • Country: 00
  • User banned.
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #82 on: April 30, 2014, 10:47:07 pm »
This thread is devolving into an PIC vs AVR flamewar...
 

Offline AndersAnd

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: dk
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #83 on: April 30, 2014, 10:53:33 pm »
TI has been stale for a while but not loosing ground. Motorola?? well maybe they get royalties or something, Zilog, Toshiba, etc, might be getting royalties as well.
Motorola?
In 1999 they first spun off and renamed their discrete semiconductor business as ON Semiconductor.
5 years later in 2004 their remaining IC semiconductor business, mainly microcontrollers was spun off and renamed Freescale Semiconductor. Freescale is still one of the world's largest MCU manufacturers as your list shows.
« Last Edit: April 30, 2014, 10:55:41 pm by AndersAnd »
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #84 on: April 30, 2014, 10:54:10 pm »
This thread is devolving into an PIC vs AVR flamewar...

Or, who can give people good compilers to make fully use of the silicon, after all, it's the silicon that gives money til Atmel and Microchip, I doubt there is that much revenue of selling compilers..
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #85 on: April 30, 2014, 10:54:37 pm »
I just did a check. Under XC8 free, a program I wrote recently compiled to have 8 NOP instructions - out of about 2.5KB in size. and I put those instructions there myself. So the compiler inserted no NOP instructions in free mode into that particular program.

That same code compiled to about 1.7KB in pro mode.

So maybe "gerry" was right then but certainly not right for this particular version of XC8 (1.12).

You can maybe compile a few programs to see for yourself.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #86 on: April 30, 2014, 11:09:34 pm »
Quote
I doubt there is that much revenue of selling compilers..

Actually, most chip vendors offer paid compilers. Vendors that offer free, full featured compilers are mostly the low-end players.
================================
https://dannyelectronics.wordpress.com/
 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #87 on: April 30, 2014, 11:11:53 pm »
Yes, have done that, compiled code for 16F877A that have 8192 words programspace this is kinda significant:

PRO mode:
Memory Summary:
    Program space        used   EF6h (  3830) of  2000h words   ( 46.8%)
    Data space           used    2Ah (    42) of   170h bytes   ( 11.4%)

Free mode:
Memory Summary:
    Program space        used  1AE7h (  6887) of  2000h words   ( 84.1%)
    Data space           used    2Fh (    47) of   170h bytes   ( 12.8%)

Of course, this code is not very clever, if written better it wouldn't take so much space in the first place.

And, since you obviously did not read this post: http://www.t4f.org/articles/optimization-of-microchip-pic-xc8-compiler-in-free-and-pro-mode/

This codeexample:

tmpPeriod=255;

Compiles to this in Free mode:
00C3  30FF     MOVLW 0xFF
00C4  00F8     MOVWF 0x78
00C5  0878     MOVF 0x78, W
00C6  00F5     MOVWF tmpPeriod

And this in Pro mode:
00B5  30FF     MOVLW 0xFF
00B7  00F7     MOVWF tmpPeriod

And there are more examples there, but no, it does not insert literally NOP statements, but those extra MOVWF/MOVF, I guess we could be without those?
Now, I don't have an disassembler at hand (any recommendations?) to check if it is like this also in 1.31..

 

Offline neslekkim

  • Super Contributor
  • ***
  • Posts: 1305
  • Country: no
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #88 on: April 30, 2014, 11:16:28 pm »
Quote
I doubt there is that much revenue of selling compilers..

Actually, most chip vendors offer paid compilers. Vendors that offer free, full featured compilers are mostly the low-end players.

Or others providing compilers, like Silabs, that licenses other compilers that you can use for free, but you cannot use the full codespace (I have an c8051f990 project going, luckily the free compiler matches the memory space.. :) )
But it seems like most for Arm(ST, Atmel, TI.. ), Avr and Microchip you have free, or other good alternatives (gcc), for me, it's only that hitch about compilers that says this for every compile that I don't like much: "The MPLAB XC8 PRO compiler output for this code could be 2343 words smaller." But ofcourse, it's "only" to turn it into pro-mode..

But do you think Microchip earns most by selling silicon or software? (don't know if they have licenses of those bigger software libraries, that might change it all)
 

Offline AndersAnd

  • Frequent Contributor
  • **
  • Posts: 572
  • Country: dk
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #89 on: April 30, 2014, 11:17:33 pm »
8bit mcus are pretty much at no growth but not loosing shares, 16 bits are declining and 32 bits are climbing (mobile stuff of course)
http://www.eetimes.com/document.asp?doc_id=1280803

« Last Edit: May 01, 2014, 08:08:18 am by AndersAnd »
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #90 on: April 30, 2014, 11:19:17 pm »
Quote
it does not insert literally NOP statements,

So does or doesn't the free compiler insert nop instructions? :)

Maybe instead of inserting those nop instructions literally, the free compiler inserts those nop instructions "figuratively"? :)

Quote
I don't have an disassembler at hand (any recommendations?) to check if it is like this also in 1.31..

You don't need a disassembler to see the disassembly. The compiler "literally" does that for you, :)
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #91 on: April 30, 2014, 11:29:51 pm »
Quote
But it seems like most for Arm(ST, Atmel, TI.. ), Avr and Microchip you have free, or other good alternatives (gcc), for me,

Of those you mentioned above, only Atmel offers "free" and full featured compiler, in atmel-avr.

TI's CCS is crippled (unless you use their launchpad); ST doesn't offer its own compiler; ARM offers a pretty expensive full-featured compiler. Microchip offered a full featured compiler, which in my view they should have paid their users to use it.

ARM chips have free and full featured compilers but not offered by the vendors - you may be able to argue that ARM actually "maintains" a free compiler but I think that's a stretch.

Quote
But do you think Microchip earns most by selling silicon or software?

You probably have to ask a Microchip insider for that. I don't think compiler sales are a big source for them in terms of revenue, but together with support, it could be meaningful profit.

I also think that they have little to gain from offering free full featured compilers: people who are too unwilling / unable to pay for a full featured compiler are unlikely to buy lots of chips. Think about for all the noise and self-importance of Arduino, what profits does Atmel get?

I think a big reason (and maybe the only reason) that Atmel offers a free full featured compiler is that gcc-avr was developed by others. It is a lot easier to offer other people's stuff for free to total strangers.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #92 on: April 30, 2014, 11:32:13 pm »
Quote
Based on these graphs it doesn't really look like 16 bits are declining although they had a peak in 2010

It is hard to reconcile that sentence to itself, :)
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #93 on: April 30, 2014, 11:33:10 pm »
Quote
Based on these graphs

A much more interesting graph would be ASP for those three classes of chips.
================================
https://dannyelectronics.wordpress.com/
 

Offline ecat

  • Frequent Contributor
  • **
  • Posts: 296
  • Country: gb
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #94 on: April 30, 2014, 11:34:33 pm »
Yes, have done that, compiled code for 16F877A that have 8192 words programspace this is kinda significant:

PRO mode:
Memory Summary:
    Program space        used   EF6h (  3830) of  2000h words   ( 46.8%)
    Data space           used    2Ah (    42) of   170h bytes   ( 11.4%)

Free mode:
Memory Summary:
    Program space        used  1AE7h (  6887) of  2000h words   ( 84.1%)
    Data space           used    2Fh (    47) of   170h bytes   ( 12.8%)

Of course, this code is not very clever, if written better it wouldn't take so much space in the first place.

And, since you obviously did not read this post: http://www.t4f.org/articles/optimization-of-microchip-pic-xc8-compiler-in-free-and-pro-mode/

These numbers look about right from my experience. If you take a look at the assembly used to implement various C functions you can, perhaps reduce the difference. The trick I used in one Pic16 project was replacing all the 'for' loops with functionally equivalent code using 'while' loops, quite a saving iirc.

Should you need to use such tricks? No, but you don't have to. Buy a bigger PIC for pennies more or pay for the pro compiler.  Sure it would be great to have full optimisation but even without it there are ways of getting the job done.


This codeexample:

tmpPeriod=255;

Compiles to this in Free mode:
00C3  30FF     MOVLW 0xFF
00C4  00F8     MOVWF 0x78
00C5  0878     MOVF 0x78, W
00C6  00F5     MOVWF tmpPeriod

And this in Pro mode:
00B5  30FF     MOVLW 0xFF
00B7  00F7     MOVWF tmpPeriod

And there are more examples there, but no, it does not insert literally NOP statements, but those extra MOVWF/MOVF, I guess we could be without those?
Now, I don't have an disassembler at hand (any recommendations?) to check if it is like this also in 1.31..

I don't have 1.31 but previously: Window->Options->Disassembly Listing ... would show you the full assembly output.
 

Offline dannyfTopic starter

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: embeddedgurus.com: "An open letter to the developers of the MPLAB IDE"
« Reply #95 on: April 30, 2014, 11:37:05 pm »
From the example I ran, the pro did a lot of pruning of unused code.
================================
https://dannyelectronics.wordpress.com/
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 5183
  • Country: ro
  • .

I don't have 1.31 but previously: Window->Options->Disassembly Listing ... would show you the full assembly output.

Yes, Window > Output > Dissasembly listing file

Alternatively, there's also Window > PIC Memory Views > Program Memory (and select code from the combo box)  .. you can save to file and all that. But the above is more convenient as it adds the C code as comments.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Based on these graphs it doesn't really look like 16 bits are declining although they had a peak in 2010:
According to this article, the 16 bit ones plateau
http://eecatalog.com/8bit/2014/01/31/microcontrollers-make-waves-in-automotive-and-internet-of-things/


Edit: adding Figure 2 description from the article:
Quote
Figure 2: In terms of device shipments, 4/8-bit MCUs overtook 16-bit devices in 2013 to regain their historic position as the largest unit-volume category in the market.  The outlook shows 4/8-bit MCUs remaining the largest unit-volume category in microcontrollers during the next five years, but 32-bit shipments are expect to be on the verge of taking the lead in 2018.

But yeah, the money per sale of the 8bit stuff is declining according to that article.

Edit: but the F (Forecast) years is like predicting the weather, they got it wrong on your article so why should they have it right on this one? But the figures up to 2013 are good and solid.
« Last Edit: May 01, 2014, 01:13:24 am by miguelvp »
 

Offline jerry507

  • Regular Contributor
  • *
  • Posts: 247
I've found that the standard libraries that come with XC8 aren't as fully featured as they were in C18. I was porting a project from C18 to XC8 and some sprintf stuff didn't exist anymore. The compiler itself seems better, though it has had a lot of teething issues that they've been steadily (if not particularly quickly) fixing.

But do I really mind? Not really. I can buy a PIC24 for the same price as the PIC18 I was using with better specs. Microchip clearly has target uses for their lines and the 8 bit stuff is steadily being pushed down in that matrix.

And it can't be stated enough that if you're serious about using a processor family, buy the tools. We're mixing the hobby market (volumes of 1-5?) with the concerns of... well any other market with volumes higher than that. Who gives a toss about code space, or even code execution speed. You just buy a slightly bigger device or run the clock slightly faster in those applications. Pick a vendor, use them consistently, buy the tools and the amount of time you'll save will vastly outweigh the minor problems.
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
MikroC Pro for PIC generates pretty good code for the little tests I've made.
« Last Edit: May 01, 2014, 08:08:27 am by miguelvp »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf