EEVblog Electronics Community Forum

General => General Technical Chat => Topic started by: CafeLogic on January 29, 2011, 11:42:16 am

Title: Microchip C32 Full Version is Kind of a Sham
Post by: CafeLogic on January 29, 2011, 11:42:16 am
First, let me state the difference between lite and full of C32. It is not very significant. In Lite, -o2 and -o3 optimization are disabled, that is the only difference. This is what happens when you fail the license check, copied strait from the source.

Code: [Select]

      /* Disable -O2 optimizations */
      NULLIFY(flag_crossjumping) = 0;
      NULLIFY(flag_optimize_sibling_calls) = 0;
      NULLIFY(flag_cse_follow_jumps) = 0;
      NULLIFY(flag_cse_skip_blocks) = 0;
      NULLIFY(flag_gcse) = 0;
      NULLIFY(flag_expensive_optimizations) = 0;
      NULLIFY(flag_strength_reduce) = 0;
      NULLIFY(flag_rerun_cse_after_loop) = 0;
      NULLIFY(flag_rerun_loop_opt) = 0;
      NULLIFY(flag_caller_saves) = 0;
      NULLIFY(flag_force_mem) = 0;
      NULLIFY(flag_peephole2) = 0;
      NULLIFY(flag_schedule_insns) = 0;
      NULLIFY(flag_schedule_insns_after_reload) = 0;
      NULLIFY(flag_regmove) = 0;
      NULLIFY(flag_strict_aliasing) = 0;
      NULLIFY(flag_delete_null_pointer_checks) = 0;
      NULLIFY(flag_reorder_blocks) = 0;
      NULLIFY(flag_reorder_functions) = 0;
      NULLIFY(flag_unit_at_a_time) = 0;
      NULLIFY(flag_web) = 0;
      NULLIFY(flag_rename_registers) = 0;

      /* Disable -O3 optimizations */
      NULLIFY(flag_inline_functions) = 0;
      NULLIFY(flag_unswitch_loops) = 0;

A few days ago Dave pointed out that, despite not being well publicized, the PIC32 compiler (C32) was actually GNU open source. That was news to me then but shorty after it occurred that it should have been obvious. C32 is based on the MIPS GCC compiler, and therefore, they have no choice. After further reading, I found that the standard libraries are governed by either the MIPS license or the BSD license. As far as I can tell, the only thing that is Microchip licensed is the peripheral library. The only condition attached to the peripheral library is that you use it only with Microchip MCUs.

In summary, I am no lawyer but it appears there is nothing that legally prevents you from using -o2 and -o3 without paying the $895 fee.

A humorous side note: I had no trouble locating and downloading the source on their website but apparently that wasn't always the plan.

From the license:

Code: [Select]
For a complete machine-readable copy of the source code corresponding to the files listed at Section 2(a)-(b) above, refer to the Company’s website or mail your request and $100 to Microchip Technology Service Center, 2100 West 14th Street, Tempe, AZ 85281.

I don't know "machine-readable" is supposed to mean but I think that coupled with clueless fanboys (http://www.microchip.com/forums/tm.aspx?m=466562) made up their original fee enforcement strategy.
Title: Re: Microchip C32 Full Version is Kind of a Sham
Post by: the_raptor on January 29, 2011, 12:25:45 pm
"Machine readable" means a text file. They can't just do something like give you print outs and claim that fulfils their obligation under the GPL. Also $100 is way above what would be considered a "reasonable fee to cover costs of distribution" so it would have been fun to see that go to court.

Pretty typical. Company doesn't want to pay to produce their own software but also doesn't want to play straight and level with FOSS licenses.

Oh and hey to really get their goat someone should start distributing binaries of the compiler (as is legal under GPL). I have seen plenty of companies whip out the C&D when you remove the minor inconvenience that is compiling from source.
Title: Re: Microchip C32 Full Version is Kind of a Sham
Post by: CafeLogic on January 29, 2011, 12:30:00 pm
"Machine readable" means a text file.

Ah, a file opposed to a hard copy, good call. I took it to mean they might take out the comments or obfuscate the code (same to the machine, but not to a human). It does say you can refer to their website OR pay the $100 so I think they are clear on that.
Title: Re: Microchip C32 Full Version is Kind of a Sham
Post by: Chasm on January 29, 2011, 12:53:52 pm
So sick the guy and gals from gpl-violations.org on them, they really like such opportunities especially when it is about such well known things like the gcc.
Title: Re: Microchip C32 Full Version is Kind of a Sham
Post by: glossywhite on January 29, 2011, 01:17:59 pm
Richard Stallman would read 'em the riot act - he'd soon humiliate them!
Title: Re: Microchip C32 Full Version is Kind of a Sham
Post by: Zero999 on January 29, 2011, 03:39:28 pm
In summary, I am no lawyer but it appears there is nothing that legally prevents you from using -o2 and -o3 without paying the $895 fee.
Go on compile it yourself and put it on your website!
Title: Re: Microchip C32 Full Version is Kind of a Sham
Post by: Bored@Work on January 29, 2011, 04:05:07 pm
It is difficult to judge if there is an issue with the GPL. I would avoid contacting anyone about any alleged violation before a real thorough look at the all the fine details. I mean, you managed to get the source code, you apparently managed to get the licenses and figure out how the parts are licensed and so on. If they had other plans? Well, does the plan matter, or does it matter what they do? IMHO the issue is, do they do enough, do they do the minimum required by the license?

If you are interested, work through http://www.softwarefreedom.org/resources/2008/compliance-guide.html (http://www.softwarefreedom.org/resources/2008/compliance-guide.html) and http://www.gnu.org/licenses/gpl-faq.html (http://www.gnu.org/licenses/gpl-faq.html) and check if there is something going on.

Title: Re: Microchip C32 Full Version is Kind of a Sham
Post by: Mechatrommer on January 29, 2011, 04:57:49 pm
In summary, I am no lawyer but it appears there is nothing that legally prevents you from using -o2 and -o3 without paying the $895 fee.
Go on compile it yourself and put it on your website!
whats the problem?
Title: Re: Microchip C32 Full Version is Kind of a Sham
Post by: CafeLogic on January 29, 2011, 05:03:12 pm
Like I said, I had no trouble getting the source and the licenses were clearly documented. I don't think there is a GPL issue, I just wouldn't pay for it. And no, I am not going to be the one to compile it with

Code: [Select]
#define SKIP_LICENSE_MANAGER

added to the gcc/condig/mips/mips.c file and post it online.
Title: Re: Microchip C32 Full Version is Kind of a Sham
Post by: glossywhite on January 29, 2011, 05:07:42 pm
It's there, it's open-source. Compile it, post it, use it. Whatever.
Title: Re: Microchip C32 Full Version is Kind of a Sham
Post by: Zero999 on January 30, 2011, 04:21:17 pm
Agreed, if all the code is clearly licensed under the GPL, compile it as you see fit, put it on your website and encourage redistribution of the non crippled legally free version.