From what I can gather, both libstdc++ and newlib are licensed under GPLv2 licenses, and are linked statically with user written software.
Due to the viral properties of GPLv2, doesn't that mean any software written for the ESP32 based on the standard Espressif provided IDF toolchain require licensing itself under a GPLv2 compliant license? Going further, requiring the source code of the full program be provided to customers who bought the product and request the source code?
Or maybe am I misunderstanding something, and simply saying "I am using GPL libraries newlibc for which the source code can be found for here, and libstdc++ for which source can be found here?".
If so, there is no way we can use the standard ESP32 and it's associated toolchain for our products as is. Maybe there isn't a painful way to have a MUSL version of GCC via crosstools-ng? I will go to a lawyer to confirm, but this looks very bleak from what I understand regarding usage in products that rely on proprietary code bases.
ESP32 licensing isues with GPLv2 libraries such as Libstdc++ and newlib?
Re: ESP32 licensing isues with GPLv2 libraries such as Libstdc++ and newlib?
Hi hak8or,
Thanks for bringing this up. I am not a lawyer, however a number of people at Espressif (including not only lawyers but also engineers on the ESP-IDF team) pay a lot of attention to correct open source licensing. We want to both ensure that we provide correct licensing with all our source files (our own and third party files), provide proper attribution to third party open source authors, and ensure ESP-IDF can always be used for building both proprietary and open source licensed firmware.
The default licensing for the newlib source code is BSD license (with some BSD-compatible MIT licensed files), as described in the COPYING.NEWLIB file in the newlib source. A copy is also provided in ESP-IDF under components/newlib/. There are a few individual source files in the upstream newlib source tree with GPL license headers for a few isolated things, for example libgloss SPARC support and some i386 Linux support files. We don't incorporate any of these things in ESP-IDF's newlib, and therefore no GPL provisions apply.
When compiling ESP-IDF programs with GCC, the toolchain may incorporate parts of GNU libstdc++ and libgcc libraries into the final binary. These toolchain libraries are provided under the GNU GPL with the additional GCC Runtime Library Exception. Linking an ESP-IDF firmware meets the requirements of the GCC Runtime Library Exception, therefore making the final binary exempt from GPL requirements.
If you build the toolchain with crosstool-NG, you can find a copy of this licensing exception under .build/src/gcc-5.2.0/COPYING.RUNTIME. Or you can read a copy online here: https://gcc.gnu.org/onlinedocs/libstdc+ ... cense.html
You didn't mention it in your question, but the third GPL Licensed piece of software we provide is FreeRTOS. (Starting from FreeRTOS 10, Amazon changed the FreeRTOS licensing to MIT but we currently ship code based on an older FreeRTOS.) FreeRTOS is provided with the FreeRTOS Linking Exception which allows linking into binaries while exempting the rest of the binary from GPL requirements.
To help ESP-IDF users distribute the correct list of licensing attributions with their firmware, we provide a list of third party copyrights and licenses here:
http://esp-idf.readthedocs.io/en/latest/COPYRIGHT.html
Thanks for bringing this up. I am not a lawyer, however a number of people at Espressif (including not only lawyers but also engineers on the ESP-IDF team) pay a lot of attention to correct open source licensing. We want to both ensure that we provide correct licensing with all our source files (our own and third party files), provide proper attribution to third party open source authors, and ensure ESP-IDF can always be used for building both proprietary and open source licensed firmware.
The default licensing for the newlib source code is BSD license (with some BSD-compatible MIT licensed files), as described in the COPYING.NEWLIB file in the newlib source. A copy is also provided in ESP-IDF under components/newlib/. There are a few individual source files in the upstream newlib source tree with GPL license headers for a few isolated things, for example libgloss SPARC support and some i386 Linux support files. We don't incorporate any of these things in ESP-IDF's newlib, and therefore no GPL provisions apply.
When compiling ESP-IDF programs with GCC, the toolchain may incorporate parts of GNU libstdc++ and libgcc libraries into the final binary. These toolchain libraries are provided under the GNU GPL with the additional GCC Runtime Library Exception. Linking an ESP-IDF firmware meets the requirements of the GCC Runtime Library Exception, therefore making the final binary exempt from GPL requirements.
If you build the toolchain with crosstool-NG, you can find a copy of this licensing exception under .build/src/gcc-5.2.0/COPYING.RUNTIME. Or you can read a copy online here: https://gcc.gnu.org/onlinedocs/libstdc+ ... cense.html
You didn't mention it in your question, but the third GPL Licensed piece of software we provide is FreeRTOS. (Starting from FreeRTOS 10, Amazon changed the FreeRTOS licensing to MIT but we currently ship code based on an older FreeRTOS.) FreeRTOS is provided with the FreeRTOS Linking Exception which allows linking into binaries while exempting the rest of the binary from GPL requirements.
To help ESP-IDF users distribute the correct list of licensing attributions with their firmware, we provide a list of third party copyrights and licenses here:
http://esp-idf.readthedocs.io/en/latest/COPYRIGHT.html
Re: ESP32 licensing isues with GPLv2 libraries such as Libstdc++ and newlib?
Wow, thank you for the thorough reply. My worries have been diminished to almost nothing based on what you wrote. I will still go to a lawyer to confirm, but it's looking great so far for now.
I did find your copyright page in the ESP32 documentation https://esp-idf.readthedocs.io/en/latest/COPYRIGHT.html,
but it seems that libstdc++ is missing from the list. Also, maybe it would be worthwhile to provide a general overview or even link back to your post here? For example, even a sentence like this at the top of the page would be great. "We at Espressif went to great lengths to ensure the software used with the ESP32 is licensed in a way to be compatible with proprietary code bases".
While the list of licenses are great, people would have to be familiar with each of the various licenses there (BSD, MIT, GPLv2 with the FreeRTOS Linking Exception, 3 Clause vs 2 Clause BSD license, ISC, Apache 2.0). Throwing a line up top like what was mentioned earlier might help to give a brief overview.
Maybe even better, link back to something like this: https://choosealicense.com/licenses/apache-2.0/
Or this, which seems to be even better: https://tldrlegal.com/license/mit-license
But yes, thank you for the great reply! It answered my worries.
I did find your copyright page in the ESP32 documentation https://esp-idf.readthedocs.io/en/latest/COPYRIGHT.html,
but it seems that libstdc++ is missing from the list. Also, maybe it would be worthwhile to provide a general overview or even link back to your post here? For example, even a sentence like this at the top of the page would be great. "We at Espressif went to great lengths to ensure the software used with the ESP32 is licensed in a way to be compatible with proprietary code bases".
While the list of licenses are great, people would have to be familiar with each of the various licenses there (BSD, MIT, GPLv2 with the FreeRTOS Linking Exception, 3 Clause vs 2 Clause BSD license, ISC, Apache 2.0). Throwing a line up top like what was mentioned earlier might help to give a brief overview.
Maybe even better, link back to something like this: https://choosealicense.com/licenses/apache-2.0/
Or this, which seems to be even better: https://tldrlegal.com/license/mit-license
But yes, thank you for the great reply! It answered my worries.
Re: ESP32 licensing isues with GPLv2 libraries such as Libstdc++ and newlib?
Hi hak8or,
Thanks for the suggestions, we will take these on board and see what we can do to improve the page.
The reason libstdc++ and libgcc aren't mentioned on this page is that they're supplied with the the toolchain, so we hadn't considered them when looking at the various pieces of software inside ESP-IDF. But given that the toolchain is required to build an ESP-IDF binary, I agree that we should mention these here.
Angus
Thanks for the suggestions, we will take these on board and see what we can do to improve the page.
The reason libstdc++ and libgcc aren't mentioned on this page is that they're supplied with the the toolchain, so we hadn't considered them when looking at the various pieces of software inside ESP-IDF. But given that the toolchain is required to build an ESP-IDF binary, I agree that we should mention these here.
Angus
Who is online
Users browsing this forum: No registered users and 129 guests