Does Microchip play fast and loose with the GPL?

I've been looking at the PIC24 and PIC32 compilers from Microchip lately. These are based on the gnu toolchain.

Their PIC24 compiler works for a month in a full-featured manner, and after that it goes down to a "student edition" that has most optimizations disabled. Once you pay megabucks you get them back. I initially thought this wasn't a violation because I assumed they wrote their own closed source optimizer. However, this appears not to be the case, and the source code they released for their C30 compiler doesn't have any reference to any kind of limitiations. So the executable they released was clearly not built from the source code they released.

Even worse, their PIC32 compiler, called C32, has a 64K code limitation unless you pay megabucks and that limitation also doesn't appear in the source that they released.

Am I looking at this wrong? I thought the GPL says that you have to release all of the source code you used to build your shipping compiler? Can someone enlighten me?

Eric

Reply to
Eric
Loading thread data ...

well, deriving code from GPL GCC (MIPS compiler?) renaming mips-gcc to pic32-gcc and selling for 1200$ sounds like Microchip lawers either HAVE not done their homework, or that they have dont it extremly well.

So or so, its really shame, that Microchip tries to sell MIPS GCC for

1200 usd

well, there NO PIC32 silicon yet available, only starterkits.

Antti

Reply to
Antti

Why would a *device manufacturer* do this anyway? Idiots.

--

John Devereux
Reply to
John Devereux

Hmmm. $1200 or market share. $1200 or market share. Which to choose?!

Reply to
Mike Silva

Which is yet another one of the reasons that I use AVR's instead.

G.

Reply to
ghelbig

Not exactly. Choice (a) is ship the source with the binaries, effectively to customers only. If that is not taken, choice (b) requires offering it to any third party at copying cost. Choice (c) inheritance is not available for commercial distribution, but choice (b) probably includes third parties in order to support inheritance for choice (c) non-commercial redistribution.

Reply to
cs_posting

Yes, the GPL requires them to release the source code for the binaries they ship - but only to those to whom they have given the binaries, and then only if they ask for them. So they are (AFAIK - IANAL) allowed to offer for downloaded a crippled binary version, and an uncrippled source version which does not match the binary version. But if you download the crippled binary, you can ask them for the crippled sources (and they must inform you of that right, and make it clear that the versions are different). If the uncrippled sources are easily available, then it's quite likely no one has bothered asking specifically for the crippled sources.

If, on the other hand, the downloadable sources are not full-featured (for example, they are missing the optimisations), then Microchip are on shaky ground. Anyone may buy the full version, insist on getting the source, and then publicly release the source - any attempt to restrict that would be a violation of the GPL.

It is close to impossible to integrate closed-source optimisers with gcc

- the gcc architecture is specifically monolithic to avoid it. There have, I believe, been regular suggestions from gcc developers wanting to make the compiler more modular (such as actively separating the front and back end binaries) and to support plugins (it would make testing much easier). These ideas have been rejected because the FSF wants to make it hard (technically and legally) to mix closed-source code within the gcc compiler.

So any optimisers that Microchip have written for their ports of gcc will also be under the GPL.

Wherever they stand with regard to the letter of the law on the GPL, these time- and space-limited binaries are certainly not within the spirit of the GPL.

It's okay to add non-GPL'ed tools along with the GPL'ed tools (such as simulators, IDEs, hardware debugger interfaces, etc.), of course.

Reply to
David Brown

I would think MIPS would be rather annoyed about this, assuming they make money on devices sold, not compilers sold.

Reply to
Mike Silva

Having looked at their PIC24 gcc source code, the key is that they call out to a license manager executable which determines the license. If the LM says so, the code in gcc simply shuts off various -O and -f options. Rebuilding with that code disabled (the sources disable it by default, but it's just a -D to turn it on) gives you a fully functional compiler. This is fine with the GPL.

Since the compilers are distributed over the web, and the sources are also, the GPL is satisfied via clause 3a. The LM bits and the license key are not covered by the GPL, so they need not worry about how they ship those to customers.

As for charging a fee, the GPL ALLOWS this. The GNU philosophy encourages you to charge what the market will bear, providing you offer sources with whatever binaries you distribute.

Microchip's license for their runtime explicitly precludes non-microchip compilers, but I can't say if rebuilding their compiler from their sources results in a not-their-compiler, from a legal point of view. I think this is something that GPL3 addresses, in that the user must be able to rebuild and *use* the binary, not just be able to rebuild it.

Reply to
DJ Delorie

I'm not sure I follow what you wrote - there are no requirements involving third parties. The GPL (in this case) only affects Microchip, and anyone to whom Microchip distributes the software. As you say, Microchip must either give them the source with the binaries, or a written offer of availability of the source for no more than a reasonable handling fee. But third parties have no writes to the code - I cannot insist that Microchip gives me source for their compiler, unless they have sold it to me, or let me download it.

Reply to
David Brown

Why bother with Microchip PIC24 C compiler? Get the Hi-Tech PIC24 C compiler, its more efficient.

I've played with both and came to the conclusion the Microchip GCC version was wasteful.

Reply to
Moon Shine

Not all entirely true. GPL V2 uses the phrase "third party" and GPL V3 requires distribution to "anyone who possesses the object code". This only applies if the source code was not shipped with the object code (i.e. case b).

Paul

Reply to
Paul Black

While this is true, the distinction isn't all that important.

Anybody who buys a GPL'ed binary from Microchip, and gets the source code, can turn around and distribute this source code to everybody else. Given that, it's not really worth the trouble for companies to restrict the source distribution of GPL software.

Reply to
Arlet

Not quite true in some cases. If a distributor chooses to use clause

3(b) (the written offer), anyone who possesses such an offer can share the offer with ANY third party, and the distributor is required to honor it - even if the third party has never had possession of the program.

For this reason, use of 3(b) is very rare.

If you read 3(b) carefully, you'll see this (emphasis mine):

b) Accompany it with a written offer, valid for at least three years, TO GIVE ANY THIRD PARTY, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

I don't know if Microchip uses 3(b) though; I did get one CD-ROM copy of their tools as part of the contest, but it included neither the sources nor an offer, and by the time I went looking for the sources they weren't online anymore[*]. So now I give advice on how to disable their license manager in gcc :-)

[*] I could have upgraded the tools and gotten *those* sources, though.
Reply to
DJ Delorie

Because the Hi-Tech compiler is more expensive? Because the Hi-Tech compiler comes with a shitty activation scheme? Because Hi-Tech will always be playing catch up (if they bother to catch up) supporting Microchip debuggers, IDE, and processors? Because the Microchip compiler includes free support and updates for life not for 12 months? Because you know all the Microchip libraries, application notes and evaluation products are going to be compatible with the compiler used to create them?

Reply to
nospam

Because if your code won't fit on the chip with Microchip compiler, you'll have to use Hi-Tech compiler.

Because Hi-Tech has been making reliable C compilers for PICs far longer than Microchip itself.

Because Microchips first attempt to compete with Hi-Tech was abandoned after their botched hack of a SwitchCraft compiler was a disastrous failure.

Reply to
Moon Shine

Having had dealings with Microchip in the past with reference to open source code I would say Microchip don't play "fast and loose" with anything, but are in fact very careful about such things. I can't imaging that they would not be in compliance with all licensing conditions - they are after all too bigger a player to make themselves a target through any clumsiness.

I think from memory (correct me if I'm wrong) that they provide their own library and chip specific headers, etc, and these are probably worth the outlay if you consider the saving they would give you. You could of course use newlib instead.

--
Regards,
Richard.

+ http://www.FreeRTOS.org & http://www.FreeRTOS.org/shop
16 official architecture ports, 5000 downloads per month.

+ http://www.SafeRTOS.com
Certified by TÜV as meeting the requirements for safety related systems.
Reply to
FreeRTOS.org

I think MIPS wouldn't have much to be grumpy about--I'm sure Microchip coughed up the required license fee and didn't guarantee a royalty revenue stream to MIPS.

-- Paul.

Reply to
Paul Curtis

Rather than being rare, the few I've seen seem to follow this route.

Since updates for most products can be obtained from a website without proof of product ownership, it would follow that the source can be obtained in the same way (i.e. without proof).

Paul

Reply to
Paul Black

Providing sources on a web site doesn't satisfy 3(b). Providing a written document, good for three years (that's the catch) along with the binaries does.

The only time I've seen 3(b) happen is with my Nokia 770. The printed manual had a page at the end that basically said "some programs on your device are covered by the GPL. Up to three years from now, you can write to this address and we'll send you the sources..."

Now, if a product came with a written note that said "we guarantee that until 2011-Mar-19 you can download the sources for this product from http://..." then that might satisfy 3(b) (one could argue that they must provide them on the same media as the product itself, likely a cd-rom) but the trick then is dating the offer. 3(b) requires a minimum of three years, which means either (1) each offer is individually dated, or (2) they honor them all until three years past their last shipment.

IMHO the key is that there must be a legally binding document to satisfy 3(b) since it's a license and it's date-sensitive. Putting sources on your web site and then not telling your customers about it in the distribution doesn't count.

Reply to
DJ Delorie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.