Author Topic: MPLAB X a PIC inhibitor! Alternatives ?  (Read 76686 times)

0 Members and 2 Guests are viewing this topic.

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #75 on: November 09, 2017, 07:06:18 pm »
For PIC16 you can grab the XC16 source release from Microchip, patch out license checks and build it yourself.

Much easier and faster: https://www.eevblog.com/forum/microcontrollers/pic32-evolution/msg1007099/#msg1007099

 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #76 on: November 09, 2017, 07:08:20 pm »
Hello and once again thank you for your many comments and help, I think part of my problem is possibly my ancient laptop that however serves me well, it uses an Intel T2300 @ 1.6Ghz together with 2Gb of 980Mhz ram and of course a standard mechanical hard drive. For most applications I use this is adequate but not comparable in any way with the performance of a high end system BUT it is quiet, consumes little power and paid for itself long ago! I also use Windows XP SP3 as it is reliable! I use a good virus checker and very good router-firewall for protection, yup there's a risk to downloads but the system can be rebuilt from backups in half a day.

As for the PIC issues I have expended considerable effort fitting the project into the constraints of devices supported by MPLAB 8 as I have no intention of buying a new laptop for MPLAB X (Oops just discovered unsuccessful). So in future for more DSP like projects I can see the ARM based products are probably the way to go, better to invest the learning curve in something with flexible tool paths than being stuck with one tool only with serious shortcomings IMOP.

Another potential path that I have some historical knowledge of is to use FPGA's using the hardware to do the required DSP extensions for a small embedded mpu. BTW I have no problems running Verilog/VHDL compilers on this laptop so it is not that slow!! MPLAB X must be total bloatware!!

Bingo the decade-old processor is the culprit. Does your laptop have the processor socketed? I have a spare Core 2 Duo T7400 (2.16GHz dual core) for sale if you want it. (My Dell Latitude D620 has a socketed T2300 initially, I upgraded it to T5600, later T7400 and finally, recently T7600. The spare T7400 is now yo to sale.)
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #77 on: November 09, 2017, 07:13:08 pm »
For PIC16 you can grab the XC16 source release from Microchip, patch out license checks and build it yourself.

Much easier and faster: https://www.eevblog.com/forum/microcontrollers/pic32-evolution/msg1007099/#msg1007099
Rebuilding XC16 gives you the chance to enable the “XC++16” option. Also the result compiler can be faster than Microchip’s by applying mainline patches upgrading the base compiler, and use an aggressive optimizing compiler and link time optimization.
 

Offline fourtytwo42Topic starter

  • Super Contributor
  • ***
  • Posts: 1183
  • Country: gb
  • Interested in all things green/ECO NOT political
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #78 on: November 09, 2017, 07:31:27 pm »
I must admit to enjoying and being impressed by everybody's contributions, I think it is good to explore the stripped to basics vs the bloatware approaches :) I have been happily building and debugging some pic24 code for the last few days using MPLAB 8 and ATM I would be challenged to measure anything in seconds even given my terrible decade old hardware! I do like stuff that is both responsive and reasonably simple to use but then of course anything you have used for years is simple compared to anything else :)
As for HDL I must confess since the last virus inspired rebuild I have not re-installed anything so not particularly active on that front ATM but in the past I have used Xylinx, Lattice and Altera without issue except the download time on my very slow rural internet! BTW once again I write everything for micro-controllers in assembler, not C as I am an inveterate clock counter......another crime!

P.S.I just realized something else that may be relevant, this machine has been stripped of anything else that wastes time or is a security risk, so no automatic updates of any kind, nothing auto-starting except the basics, no cruddy flash, never over my dead body java and no microcrap net or whatever its called ewwww!! So most of my parsimoniously small memory is available for ME (OMG I seem to remember an awful windows called that, no I mean ME in person :)))
« Last Edit: November 09, 2017, 07:50:27 pm by fourtytwo42 »
 

Offline mrpackethead

  • Super Contributor
  • ***
  • Posts: 2845
  • Country: nz
  • D Size Cell
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #79 on: November 09, 2017, 07:52:33 pm »
It's just a fact of life, get over it. There is no reason for a vendor to put in any work to support very obsolete hardware when new hardware is cheap. Anyone who can't afford a few hundred bucks to run reasonably modern kit is not a significant customer to them.
Microchip have been good in continuing to support old MPLAB8 via the driver switcher, that's as much as anyone could reasonably ask.

Its hard enough to get any level of significant support when you only buy low $100sk of parts a year.     I've found a few good people to interface directly with and thats helped immensely..     But its been a two way street, i've been finding a few bugs, ( mostly because i always seem to be pushing corner cases ) and then reporting them back to microchip,   sometimes even providing the fixes.   

I'd love them to open the open-source harmony a bit more though, 
On a quest to find increasingly complicated ways to blink things
 

Offline eugenenine

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: us
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #80 on: November 09, 2017, 08:41:14 pm »
Hello and once again thank you for your many comments and help, I think part of my problem is possibly my ancient laptop that however serves me well, it uses an Intel T2300 @ 1.6Ghz together with 2Gb of 980Mhz ram and of course a standard mechanical hard drive. For most applications I use this is adequate but not comparable in any way with the performance of a high end system BUT it is quiet, consumes little power and paid for itself long ago! I also use Windows XP SP3 as it is reliable! I use a good virus checker and very good router-firewall for protection, yup there's a risk to downloads but the system can be rebuilt from backups in half a day.

As for the PIC issues I have expended considerable effort fitting the project into the constraints of devices supported by MPLAB 8 as I have no intention of buying a new laptop for MPLAB X (Oops just discovered unsuccessful). So in future for more DSP like projects I can see the ARM based products are probably the way to go, better to invest the learning curve in something with flexible tool paths than being stuck with one tool only with serious shortcomings IMOP.

Another potential path that I have some historical knowledge of is to use FPGA's using the hardware to do the required DSP extensions for a small embedded mpu. BTW I have no problems running Verilog/VHDL compilers on this laptop so it is not that slow!! MPLAB X must be total bloatware!!

Bingo the decade-old processor is the culprit. Does your laptop have the processor socketed? I have a spare Core 2 Duo T7400 (2.16GHz dual core) for sale if you want it. (My Dell Latitude D620 has a socketed T2300 initially, I upgraded it to T5600, later T7400 and finally, recently T7600. The spare T7400 is now yo to sale.)

Even if its an older laptop it still shouldn't be that slow.  I have a Dell Latitude 1100 netbook and mplab X takes under 30seconds to launch, open a project and start building.  This is an Atom CPU  with a whole 2G of RAM.
 

Offline TomS_

  • Frequent Contributor
  • **
  • Posts: 834
  • Country: gb
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #81 on: November 17, 2017, 08:20:44 pm »
XC16 and XC32 are GCC compilers with some modifications. It's licensed under the GPL and everybody can use it with all optimizations enabled. No need to buy a stupid license from Microchip...

Can you elaborate?

I am working on a project that is using XC16, but if I, for example, try to enable optimisation level 3 through MPLAB X, I just a whole bunch of red nag messages in the build window saying I need to purchase a license.

0 and 1 work just fine though.

Maybe I missed something?
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #82 on: November 17, 2017, 09:17:59 pm »
Maybe I missed something?
You missed the link with dodgy legal advice that tells you how to crack the licence.
 
The following users thanked this post: TomS_

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #83 on: November 18, 2017, 09:04:02 am »
Maybe I missed something?
You missed the link with dodgy legal advice that tells you how to crack the licence.

If you should have read the instructions, you would have noticed that it's not about cracking the license...

The compiler is licensed under the GPL, Microchip can not change that. Everybody is free to modify it.
 

Online Ian.M

  • Super Contributor
  • ***
  • Posts: 12806
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #84 on: November 18, 2017, 09:42:46 am »
However the Microchip XC16/XC32 runtimes are *NOT* GPLed and IIRC are closed source and only licensed for use with a licensed Microchip XC compiler.  There are various other proprietary components as well (e.g linker scripts). That means you'd have to clean-room reverse engineer, write and build compatible runtimes and other components from scratch to get a clean legal GPL toolchain.
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #85 on: November 18, 2017, 03:08:59 pm »
However the Microchip XC16/XC32 runtimes are *NOT* GPLed and IIRC are closed source and only licensed for use with a licensed Microchip XC compiler.

There does not exist something like a "licensed Microchip XC compiler" for PIC16 or PIC32.
You can not change the license of (or re-license) software that comes under the GPL license.
XC16 and XC32 are actually modified GCC compilers.
That means that, according to you, everybody who uses it without a license is at risk anyway.
Obviously, that's not the case.

Check the file /opt/microchip/xc32/v1.44/docs/MPLAB_XC32_Compiler_License.txt:

Quote
4. Open Source Components.  Notwithstanding the license grant in Section 2 above, Licensee further acknowledges that certain components of the Software may be covered by so-called "open source" software licenses ("Open Source Components"). Open Source Components means any software licenses approved as open source licenses by the Open Source Initiative or any substantially similar licenses, including without limitation any license that, as a condition of distribution of the software licensed under such license, requires that the distributor make the software available in source code format. To the extent required by the licenses covering Open Source Components, the terms of such license will apply in lieu of the terms of this Agreement. To the extent the terms of the licenses applicable to Open Source Components prohibit any of the restrictions in this Agreement with respect to such Open Source Components, such restrictions will not apply to such Open Source Component.

So, the restrictions of the license does NOT apply to the XC32 and XC16 compilers. You are free to select (switch-on) whatever optimization you like.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #86 on: November 18, 2017, 03:15:09 pm »
So, the restrictions of the license does NOT apply to the XC32 and XC16 compilers. You are free to select (switch-on) whatever optimization you like.

Also, I think that the optimizations in question are mostly part of the original GCC, not something added by Microchip.
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #87 on: November 19, 2017, 05:17:32 am »
So, the restrictions of the license does NOT apply to the XC32 and XC16 compilers. You are free to select (switch-on) whatever optimization you like.

Also, I think that the optimizations in question are mostly part of the original GCC, not something added by Microchip.
Even if it is added by Microchip, the second it is added into GCC code tree it is subjected to GPL. Otherwise the GCC Linking Exception will be invalidated and every single piece of code compiled by XC16 and XC32 becomes GPL, making Microchip and all users of PIC24/dsPIC33/PIC32 easy targets for FSF to enforce GPL on. (Remember back when FSF sued Linksys over Linux kernel for GPL?)
 

Offline Bruce Abbott

  • Frequent Contributor
  • **
  • Posts: 627
  • Country: nz
    • Bruce Abbott's R/C Models and Electronics
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #88 on: November 19, 2017, 06:34:42 am »
Also, I think that the optimizations in question are mostly part of the original GCC, not something added by Microchip.

Quote from: technix
Even if it is added by Microchip, the second it is added into GCC code tree it is subjected to GPL

Quote from: Karel
There does not exist something like a "licensed Microchip XC compiler" for PIC16

Unlike all you internet lawyers, I have neither the training nor sufficient knowledge of how Microchip implemented their license scheme to give reliable legal advice on the subject. However Microchip obviously thinks they have a right to enforce their licenses, and I bet they had actual lawyers check it out. Are you willing to challenge them in court?

But hey, if you think you can get away with it then crack away! Then when Microchip moves to fully proprietary pay-only software with onerous EULAs I will know who to blame.
 
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #89 on: November 19, 2017, 07:53:31 am »
I have neither the training nor sufficient knowledge of how Microchip implemented their license scheme to give reliable legal advice on the subject.

Me neither. That doesn't mean I can't have an opinion about it.

However Microchip obviously thinks they have a right to enforce their licenses, and I bet they had actual lawyers check it out.

It's my opinion that Microchip had their lawyers checkout how to "enforce" a license on a piece of GPL software without getting sued themselves, not how to sue others.

Are you willing to challenge them in court?

I guess the Free Software Foundation will be happy to drag their asses into court if they are going to break balls about the GCC compiler....

But hey, if you think you can get away with it then crack away!

Please don't make the mistake to think it's a crack. It's not.
Microchip hacked the compiler in order to block certain optimizations.
I hacked the compiler to unblock the optimizations.

Then when Microchip moves to fully proprietary pay-only software with onerous EULAs I will know who to blame.

I blame people like you that a company can get away with asking money for software they didn't pay a dime for.
Software that is meant to be free, written by people who want you not only to use it for free, but also encourage you
to hack it and improve it and give back to the community.


« Last Edit: November 19, 2017, 07:55:04 am by Karel »
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13694
  • Country: gb
    • Mike's Electric Stuff
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #90 on: November 19, 2017, 08:12:00 am »
.... asking money for software they didn't pay a dime for.
So all those device-specific info files, linker scripts, documentation etc. costs nothing to produce ?
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #91 on: November 19, 2017, 08:43:14 am »
.... asking money for software they didn't pay a dime for.
So all those device-specific info files, linker scripts, documentation etc. costs nothing to produce ?

Where did I say that? I was talking about the compiler.
Microchip let you use those device-specific info files, linker scripts, documentation for free. Probably it helps them selling lot's of microcontrollers.
In that case it's just a normal cost that comes with the business.

The hack that undo the hack of Microchip doesn't change (the usage of) those device-specific info files, linker scripts, documentation.
It only affects the GCC compiler optimization setting.
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2277
  • Country: gb
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #92 on: November 19, 2017, 09:57:07 am »
.... asking money for software they didn't pay a dime for.
So all those device-specific info files, linker scripts, documentation etc. costs nothing to produce ?

In comparison to the cost of GCC's development (which Microchip contributed nothing to and gained much from), yes, nothing.
« Last Edit: November 19, 2017, 10:06:00 am by voltsandjolts »
 

Offline JanJansen

  • Frequent Contributor
  • **
  • Posts: 380
  • Country: nl
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #93 on: November 19, 2017, 01:58:31 pm »
On my PC the new MPLAB X dont even works,
when downloading the old version 2.35 it works.
Ok its very slow to start up, takes at least one minute to initialize, started up once its faster.
While waiting the minute i have visual running in advance to edit code.
The netbeans is a problem, they better remove that.
aliexpress parachute
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #94 on: November 19, 2017, 03:07:35 pm »
Then when Microchip moves to fully proprietary pay-only software with onerous EULAs I will know who to blame.

Blame? That would be very positive.

XC8 is proprietary - it works well given the CPU. MPLAB 8 was proprietary - worked great by my opinion.

XC16 and XC32 are leveraged. XC32 is good because GCC already had implementation for MIPS. But if you look at the Microchip's part - e.g. interrupt prologues/epilogues etc - these are not highly optimized. Neither is XC16 - it doesn't really produce highly optimized code because GCC doesn't have direct support for their CPU (Microchip had to do it by themselves). Microchip is MPLAB X is leveraged, you know how it works ...

Looking at these examples, I am all for proprietary.

If you want either XC16 or XC32 compiler you can simply compile from the source. Moreover, if you have any difficulties doing so, Microchip will help you. The full source code is published and may be downloaded. Microchip is not cheating here. Or, you can buy the pre-compiled version. For most people, it is easier to spend money than to compile, so the vast majority will buy it instead of compiling. Others (me for example) will use the free version which is perfectly perfect for most practical purposes.

This is how the market works. However, this is not an indication that Microchip has put lots of efforts into these compilers. That's the opposite. They used open source GCC for the exact purpose of not spending efforts on the development. And people who buy non-free version don't pay for the Microchip's development effort. If you read the license, the payment is mostly for the on-going support.

 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #95 on: November 19, 2017, 04:57:09 pm »
Then when Microchip moves to fully proprietary pay-only software with onerous EULAs I will know who to blame.
If you want either XC16 or XC32 compiler you can simply compile from the source. Moreover, if you have any difficulties doing so, Microchip will help you. The full source code is published and may be downloaded. Microchip is not cheating here. Or, you can buy the pre-compiled version. For most people, it is easier to spend money than to compile, so the vast majority will buy it instead of compiling. Others (me for example) will use the free version which is perfectly perfect for most practical purposes.

You missed the point. This not about buying the pre-compiled GCC compiler. This is also not about compiling the compiler from source.
This is about modifying/hacking the compiled, GCC compiler, as provided by Microchip i.e. editing the executable in order to unblock the optimizations which have been blocked by Microchip which Microchip did by hacking the GCC source code.
« Last Edit: November 19, 2017, 05:00:43 pm by Karel »
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #96 on: November 19, 2017, 05:16:03 pm »
You missed the point. This not about buying the pre-compiled GCC compiler. This is also not about compiling the compiler from source.
This is about modifying/hacking the compiled, GCC compiler, as provided by Microchip i.e. editing the executable in order to unblock the optimizations which have been blocked by Microchip which Microchip did by hacking the GCC source code.

I understand your idea. I just don't think it's a huge difference between this and compiling. If I wanted the pro version for free (which I don't), I would probably go with compiling. This gives you an opportunity to fix or add something, use more modern version of GCC, etc. One example would be to improve interrupt prologue/epilogue generation for PIC32. You can even fork it and publish it on GitHub if you're so inclined.
 

Offline voltsandjolts

  • Supporter
  • ****
  • Posts: 2277
  • Country: gb
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #97 on: November 19, 2017, 05:22:45 pm »
Thats a good idea.
If you could set up a linux virtualbox machine with the necessary build environment and distribute it that would be much appreciated (and legal of course). Its beyond me  :(
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #98 on: November 19, 2017, 05:31:46 pm »
You missed the point. This not about buying the pre-compiled GCC compiler. This is also not about compiling the compiler from source.
This is about modifying/hacking the compiled, GCC compiler, as provided by Microchip i.e. editing the executable in order to unblock the optimizations which have been blocked by Microchip which Microchip did by hacking the GCC source code.
I just don't think it's a huge difference between this and compiling.

Well, I guess that for most people (at least for me), it is a huge difference. So, if you can provide a step by step manual for dummies like me how to download and compile the GCC sourcecode from Microchip, that would be very nice.

But, also this was not the point. The point was if it's legal or not to hack/modify GPL licensed software.
 

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #99 on: November 19, 2017, 05:39:21 pm »
But, also this was not the point. The point was if it's legal or not to hack/modify GPL licensed software.

Of course it is legal. It is illegal to forbid hacking GPL licensed software. And it is not really a challenge, because GPL means that you get all the source code and a manual how to compile it (and if you don't, it is illegal again and the FSF will be happy to help you), so you can just modify the source code as you like. But don't forget to publish your modifications or a contact address how to get it, because this is required by GPL.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf