I wrote a C++ library for Arduino. The source code have the following specificities:

  • it includes headers, uses functions, macros, and structures/classes (and their methods) from LGPL libraries (Arduino.h from the Arduino Core, Servo.h from the Servo library)
  • it uses GCC macros like __AVR_DEVICE_NAME__. Such macros are also used by the Arduino.h
  • it uses linker variables
  • it is used for all Arduino boards (AVR, megaAVR, SAMD). So the AVR and ARM toolchains are involved.

I would like to choose a permissive GPL-compatible or LGPL-compatible open-source license such as the Modified BSD license. Is it possible here?

It is unclear to me how GPL and LGPL are restricting my license choice here. Looking at the AVR and ARM toolchains licenses in Atmel Studio folder (AVR8_toolchain_License.txt, ARM_toolchain_License.txt), it appears that they include many libraries like binutils that are either GPL or LGPL (or sometimes both, which is unclear), either 2.0 or 3.0 or both (this is also unclear), and GCC has the GCC Runtime Library Exception. Few libraries are under permissive licenses such as MIT.

Also, it is unclear if including Arduino.h is not including GPL code/libraries behing the scene that would also restrict my choice.


Yes you can license your library with any LGPL-compatible open-source license. See this explaination which states that

[...] applications that use the library don't have to be [distributed under LGPL]

The LGPL is very permissive from the perspective of an application developer. Anyway, you cannot sub-license the 3rd-party library (arduino). If you want to distribute the library (modified or unmodified), you have to license the library under the terms of the LGPL.

Edit To avoid misunderstandings: you can even use the library in non-compatible licensed code as long as you don't redistribute the library under different terms than LGPL.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.