More clarity on SPI.h licensing terms

MichaelT

Member
The version of SPI.h on GitHub is licensed as
* ... GNU General Public License version 2
* or the GNU Lesser General Public License version 2.1, both as
* published by the Free Software Foundation

However, I am looking at open-sourcing a Teensy-based project with GPL 3, due to terms of other libraries used (in addition to SPI.h, used unmodified). The licensing terms would indicate that SPI.h and _a_later-version_GPL-licensed_library.h cannot be used together. This is both inconvenient and puzzling.

I therefore have some questions:

(1) Is SPI.h released ONLY as GPL 2 / LGPL 2.1, or does it include later versions? The licensing description is currently ambiguous and bad practice according to the GNU people themselves. See https://www.gnu.org/licenses/identify-licenses-clearly.en.html

(2a) If the "v2 ONLY" option, why?

(2b) If the "v2 ONLY" option, can license exceptions be granted to specific open-source projects?

The closest discussion I could find on PJRC forum is this thread, but there was no conclusion about using SPI.h in open-source projects with more recent GPL versions.
 
"The Free Software Foundation urged developers to choose or any later version..." [gnu.org] but if developers did not so choose, are the terms not precisely as they are written? While FSF may consider it bad, I'm not sure I see an ambiguity in that language itself. If there is ambiguity, it appears to me only within an assumed original developer intent- but that's simply an assumption.
 
Maybe it's time to review whether any of the original SPI code from Arduino remains in Teensy's SPI library today. If so, it would be only for Teensy 2.0. Even that code has been rewritten several times...

@KurtE - Any thoughts on changing to MIT license? As I recall, you wrote a good chunk of the current code, especially the async stuff.
 
but there was no conclusion about using SPI.h in open-source projects with more recent GPL versions.

Just to make sure I really answered this original question, I want to say as clearly as possible the LGPL stuff comes from Arduino. No matter how unsuited it is to your needs, even if it can't meet anyone's needs, even if it's utterly contradictory or non-nonsensical or otherwise just wrong, only the original authors can alter the license terms for their code.

What we can do, and I believe we may have already done, is rewrite it all so none of Arduino's original code is left. Or perhaps "none" is too high a bar, and maybe we can consider it all rewritten if all that remains is API definition. But even if just a few lines might be remaining in common, even if we can show every line was rewritten but the process derived from the original, changing an open source license can be considered controversial. We can't just take such a step lightly. It requires careful review. That's unlikely to happen soon.

I'm sure this isn't the answer you wanted. But it really needs to be said as clearly as possible, we can't change or "clarify" the license on open source code other people wrote.
 
I'm sure this isn't the answer you wanted.
Actually, the answers so far are exactly what I wanted. I didn't know before whether the LGPL + GPL was because Paul etc decided to publish original code this way, or (as you say, from the fact some came from Arduino) the code was previously published under these licenses.

--------

For the case I am specifically interested in, I am looking to see whether SPI.h can be used in a GPL v3.0+ project. The SPI.h library will be linked with
Code:
#include <SPI.h>
to a sketch in the Arduino IDE

It seems that LGPL2.1 is "compatible" with GPL v3 in the sense that it allwos SPI.h code to be incorporated within the new project with the newer license. GNU say (source here)
LGPLv2.1 gives you permission to relicense the code under any version of the GPL since GPLv2. If you can switch the LGPLed code in this case to using an appropriate version of the GPL instead (as noted in the table), you can make this combination.
When we say “copy code,” we mean just that: you're taking a section of code from one source, with or without modification, and inserting it into your own program, thus forming a work based on the first section of code. “Use a library” means that you're not copying any source directly, but instead interacting with it through linking, importing, or other typical mechanisms that bind the sources together when you compile or run the code.
1705248279255.png


If this case applies, then the maximum I would need to do is include a copy of the SPI.h source code with my other files. Agree? (A yes/no from Paul or Kurt is what I'm looking for here)

In the worst case, where the library is incompatible with other GPL versions, I'm using only a few functions
Code:
  SPI.begin();
  SPI.beginTransaction(SPISettings(10000000, MSBFIRST, SPI_MODE0));
  SPI.transfer16(bytes);
so I can just rewrite these for a specific Teensy version (T4.1) from the MCU programming manual.
 
Back
Top