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

0 Members and 1 Guest are viewing this topic.

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2217
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #275 on: May 03, 2018, 06:17:08 am »
..., and some info in the thread was largely related to cracking XC16/32, ...

It's important how you formulate it. It's not a crack. Microchip hacked the GCC compiler so that you can't use higher optimizations.
We un-hack it. A crack sounds illegal for a lot of people. It's not illegal, so don't use the word crack.
 

Offline @rt

  • Super Contributor
  • ***
  • Posts: 1059
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #276 on: May 03, 2018, 06:54:16 am »
I see where you’re coming from, but since their particular implementation and distribution is legal AFAIK,
so long as they provide sources and scripts to build open source components,
the methods to bypass XC16/32 license checking are cracks for that particular implementation,
and it has already been debated here, without consensus, whether or not that is legal to do, regardless of ethics.

 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2217
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #277 on: May 03, 2018, 07:31:18 am »
I see where you’re coming from, but since their particular implementation and distribution is legal AFAIK,
so long as they provide sources and scripts to build open source components,

Yes, it is.

the methods to bypass XC16/32 license checking are cracks for that particular implementation,

No, it's not. It's just a particular implementation of their particular implementation.

and it has already been debated here, without consensus, whether or not that is legal to do, regardless of ethics.

If you have the right to express your opinion and call it crack, then I have the right to express my opinion and say that you are wrong.
 

Offline @rt

  • Super Contributor
  • ***
  • Posts: 1059
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #278 on: May 03, 2018, 07:47:26 am »
I’m calling cracking, the bypassing of some software mechanism,
and wasn’t aware it was a matter of opinion:

https://en.m.wikipedia.org/wiki/Software_cracking
 
The following users thanked this post: hans

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2217
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #279 on: May 03, 2018, 08:55:36 am »
I’m calling cracking, the bypassing of some software mechanism,
and wasn’t aware it was a matter of opinion:

https://en.m.wikipedia.org/wiki/Software_cracking

According to Wikipedia:

Quote
Software cracking is the modification of software to remove or disable features which are considered undesirable by the person (or company!) cracking the software, ...

That means that Microchip cracked the GCC compiler...! Because they removed or disabled the higher optimization settings.

 

Offline @rt

  • Super Contributor
  • ***
  • Posts: 1059
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #280 on: May 03, 2018, 09:00:17 am »
It does if you can find any other example of a source code that is commonly referred to as cracked.
Executables are cracked.
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2217
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #281 on: May 03, 2018, 09:15:59 am »
Executables are cracked.

Only in the context of closed source software.

In the context of open source software, specifically GPL'ed software, executables are patched, not cracked.

An example is the delta-rpm used by Opensuse. When they provide updates, the default is not to use normal rpm but delta-rpm that patches a part of the executable by
overwriting and/or inserting bytes directly into an existing executable (binary) file .

 

Offline Siwastaja

  • Super Contributor
  • ***
  • Posts: 8172
  • Country: fi
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #282 on: May 03, 2018, 10:31:46 am »
Karel, the problem with stupidity is that people who are this freaking stupid are too stupid to see their own stupidness. Hence, any attempt to explain the case in a civil or logical manner is utter waste of time.

This exact same discussion has been seen several times on these forums, it's always the same couple of people and the discussion is never fruitful. It's best to just update your ignore list and go on.

It's the same as trying to discuss with anti-vaccinators or anti-abortion. It's political even when it should be factual, so it simply won't ever work out, no matter how much effort you put in trying to be sensible.
 
The following users thanked this post: fourtytwo42

Online cv007

  • Frequent Contributor
  • **
  • Posts: 826
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #283 on: May 03, 2018, 12:56:43 pm »
I didn't know they came out with xc16 v 1.34, I'll take a look and update my info if possible.
They don't provide the source to xc16 v1.34, so not sure what their new plan is- maybe just an oversight.
 

Offline JanJansen

  • Frequent Contributor
  • **
  • Posts: 380
  • Country: nl
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #284 on: May 03, 2018, 01:56:11 pm »
I used Karels method for XC16 & XC32, only not working for XC8.

I read there is another method also, and i read it also dont works anymore ?
If there is still another method, does it work also for XC8 ?, and does Karels method still works with new versions ?
Problem is i want the XC8 also.

Maybe they better release a full version for non commercial use, companys will pay, just like microsoft visual studio ?, as it looks now companys dont have to pay by law, i guess they can make more money, i bet they read this topic also, especially the word money.
Then we dont have to hack unlock to get some more power out of these chips, and we saving energy alltogether to save the world, dont run slow code.
« Last Edit: May 03, 2018, 01:59:34 pm by JanJansen »
aliexpress parachute
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2217
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #285 on: May 03, 2018, 03:54:38 pm »
I used Karels method for XC16 & XC32, only not working for XC8.

XC8 is a completely different compiler. It's not GCC and it's not open source. You are not allowed to modify it.
 

Online cv007

  • Frequent Contributor
  • **
  • Posts: 826
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #286 on: May 03, 2018, 04:04:14 pm »
I added xc16 v1.34 info (binary mod for Linux only at the moment)
https://github.com/cv007/XC3216

Even though they do not provide the source, it appears nothing really changed, the specs method still works and finding the binary mod was the same as before.
 

Offline @rt

  • Super Contributor
  • ***
  • Posts: 1059
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #287 on: May 06, 2018, 09:36:25 am »
@cv007, you have a field for Mac OS that’s empty for v1.34, I assume you still don’t know. It’s 0x64D8E7.
I probably had it first go, but Hex Workshop saves the file original unless I “Save As” and write a new file.

With regard to the former,
It’s just semantics, and nothing that can be liked to opinions on anti-vac or anti-abortion (now THAT is stupid to even liken to a mere semantic topic).

Of course binaries can be patched. I said binaries are cracked, meaning only binaries are cracked.
Now I challenge you to go find any widely accepted reference to a source code that has been “cracked”, because that’s not what you have done.
XC16 is a commercial distribution, with a deliberate mechanism in place to restrict access to certain features. To bypass that mechanism without
access to it’s complete source code, and rebuilding it is called a crack. If you have the source code and a means to build it, there’s nothing to crack.

 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2217
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #288 on: May 06, 2018, 02:09:36 pm »
XC16 is a commercial distribution, ...

So what? Its' completely fine to commercially sell GPL software.
But they cannot take away the GPL license that says the enduser is always free to modify it.

Check the file /opt/microchip/xc32/v2.05/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. Also by patching the binary.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #289 on: May 06, 2018, 08:41:35 pm »
Quote
Also by patching the binary.
Hmm.  Is there an open-source license that specifically dis-allows "patching the binary"?
As in "my for-profit service is to sell pre-compiled binaries of (complicated) source-tree at various cost/performance levels, and while you are welcome to figure out the process to build from source any version you want, you MAY NOT patch one of my simplistically-protected low-cost binaries to become the same as the high-cost binary."
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2217
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #290 on: May 07, 2018, 08:58:29 am »
... , you MAY NOT patch one of my simplistically-protected low-cost binaries to become the same as the high-cost binary."

That depends. Does your software contains GPL'ed software?
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #291 on: May 08, 2018, 11:09:05 pm »
Quote
Quote
you MAY NOT patch the binary
That depends. Does your software contains GPL'ed software?
Assume not, for simplicities sake.  Just "does such a license exist", not "how does in interact with everything else."

Alternately, assume that it links in LGPL 2.x or "GPL3 with linking exception" libraries like libgcc...
 

Online cv007

  • Frequent Contributor
  • **
  • Posts: 826
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #292 on: May 09, 2018, 02:13:04 am »
Quote
Is there an open-source license
I think if you lookup the 'open-source' definition (I guess by those who claim to define it), I don't think you could come up with any license that would meet that definition and also restrict you from making changes (binary or otherwise). You can take open-source code such as bsd licensed code, put it in your own code, come up with any license (restrictions) you want- but then it no longer qualifies as open-source at that point.

Since gcc is gpl (and you cannot do as above with bsd code), we don't have to get too twisted up thinking about various possible scenarios that could be/could have been.
 

Offline @rt

  • Super Contributor
  • ***
  • Posts: 1059
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #293 on: May 09, 2018, 04:13:56 am »
For the record, I wasn’t talking about what’s right or wrong, or what’s legal or illegal. Just a semantic.

Nevertheless, I’ll no longer have to worry about it.
I don’t think it’s even prudent to have been stuck into the same company microcontrollers for a decade or so
without trying something else.
(Regardless of whether or not I think they are shitting on GPL and their customers).

Next I’m trying a TI controller.
Admittedly not nearly as forthcoming with samples as Microchip are.


 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #294 on: May 09, 2018, 05:14:39 am »
Good luck, everytime i do that i fail to see what the big fuss is and fall back to using a pic18, dspic or pic32. Unless there is a completely different peripheral or a particular requirement i like to stick with the devil i know best..
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 2217
  • Country: 00
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #295 on: May 09, 2018, 06:36:32 am »
Quote
Quote
you MAY NOT patch the binary
That depends. Does your software contains GPL'ed software?
Assume not, for simplicities sake.

In that case I don't know. What I do know is that XC16 and XC32 use the GCC compiler which uses the GPL v3.1 license.
And binaries made of GPL'ed software may be patched. Nobody can forbid that.
 

Offline imk

  • Regular Contributor
  • *
  • Posts: 183
  • Country: gb
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #296 on: May 10, 2018, 04:22:53 pm »
Must say 1st time i used mplab x i was not keen, but is growing on me.
not done a big project in it yet just little applets so early days
1201 Alarm
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14470
  • Country: fr
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #297 on: May 10, 2018, 06:05:34 pm »
Quote
Quote
you MAY NOT patch the binary
That depends. Does your software contains GPL'ed software?
Assume not, for simplicities sake.

In that case I don't know. What I do know is that XC16 and XC32 use the GCC compiler which uses the GPL v3.1 license.
And binaries made of GPL'ed software may be patched. Nobody can forbid that.

I guess you're right in principle. And the way GCC is built, there is now way Microchip could claim having isolated their contributions enough not to make the whole resulting compilers GPL. It's just impossible. So you should be able to do pretty much as you like with the compiler itself.

What they can protect though and not make GPL is all their support files for their microcontrollers (headers, libraries...) that they can't help but distribute freely. But those are the files that they should protect actually. It's just that it would be very unpractical to do so, so they protect the binaries instead, which is much easier (but not all that effective obviously).

On a legal point of view, I think you should be free to use XC16/32 as you see fit without any restriction, but I'm not sure you'd be authorized to use Microchip's support files. And without those, frankly, you wouldn't be able to do much. You could always rewrite them as long as it's obvious that they are substantially different from the original, but that sounds like a lot of work. (AFAIK, this is what the MinGW team has done for the Windows SDK headers and import libraries?. A lot of work.)

Anyway, according to the GPL, you should be free to redistribute the binaries themselves (even Microchip ones) as long as you distribute the source code along with them. Patching them is a different story - I don't know how that would be considered exactly on a legal standpoint. This would be a modification of the binaries that would make them not match the source code anymore, thus breaching the GPL somewhat. OTOH, circumventing artificial limitations in GPL software may not be considered as a modification at all. I guess the end of the story will only be known once a court settles a case like this.

I'd tend to doubt Microchip would take this to court though - they probably are borderline with the GPL so they may not want to risk losing a lot in court.
 

Offline Vasi

  • Regular Contributor
  • *
  • Posts: 60
  • Country: ro
    • Visual Pin Configurator for Nucleo L152RE - produces SPL code.
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #298 on: May 21, 2018, 04:04:29 am »
...
I just wish they’d invest their efforts in making a fluid UI rather than fannying around with bug infested code generators. I started using Atmel Studio a year or so ago for a couple of projects, it’s just so much slicker, I even thought the debugger wasn’t working, it’s so quick to program. I’m afraid that won’t please the non-Windows folk.

If you are able to generate a Makefile for your project, then using the cross platform Visual Studio Code can be as pleasing to use by the non-Windows folk.
 

Online cv007

  • Frequent Contributor
  • **
  • Posts: 826
Re: MPLAB X a PIC inhibitor! Alternatives ?
« Reply #299 on: June 19, 2018, 11:12:04 pm »
Since there was a reminder that a new version of mplabx was out and xc32 increased recently to v2.10, I thought I would check them out (I'm on Linux fyi). I checked out the new xc32 v2.10 and although the byte offset location remains exactly the same (for the binary mod), it does not work.  The source is not available (yet), but at a quick glance it appears from an objdump it is similar to the previous versions- but they must be doing something different, or I am making some mistake. It is odd that the byte offsets of interest are exactly the same on all 3 files as v2.05- not sure how that happens with different code. I guess when the source becomes available I can check it out, although not terribly important.

While checking it out I discovered that gcc is looking for a specs file all over the place, so decided to simplify. I had previously assumed a -specs global option was required for the specs file, and therefore a global option had to be added to the project (every project). It now seems it is much simpler than that- just create a 1 (xc16) or 3 (xc32) line specs file and place it in a specific folder (there are many to choose from, I just picked one of them). All done.

My latest xc32/16 info-
https://raw.githubusercontent.com/cv007/XC3216/master/xc32xc16-info-rev6.txt

I tested with xc32 ver 1.44,2.05,2.10, xc16 ver 1.33,1.34 -  but have not tested with Windows, but there is no reason it should not work the same.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf