You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suggest adding the ability to add/remove platform properties (AKA "build properties", "compiler flags") and gui options via the library.properties metadata file.
My case
I created a PlatformIO library: https://github.com/Levi--G/USBLibrarySTM32. I am regularly asked to add support for using my library with Arduino IDE, but the lack of this capability makes it impossible for me to do so.
The reason is that the library requires the USB peripheral clock of the STM32 microcontroller to be enabled. This is controlled in the STM32 boards platform source code by preprocessor conditionals. So the library requires the -D USBCON and -D HAL_PCD_MODULE_ENABLED flags to be injected into the compilation commands.
Describe the current behavior
It is not possible for libraries to configure platform properties.
Describe the request
I suggest adding the ability to add/remove platform properties (AKA "build properties", "compiler flags") and gui options via the
library.properties
metadata file.My case
I created a PlatformIO library: https://github.com/Levi--G/USBLibrarySTM32. I am regularly asked to add support for using my library with Arduino IDE, but the lack of this capability makes it impossible for me to do so.
The reason is that the library requires the USB peripheral clock of the STM32 microcontroller to be enabled. This is controlled in the STM32 boards platform source code by preprocessor conditionals. So the library requires the
-D USBCON
and-D HAL_PCD_MODULE_ENABLED
flags to be injected into the compilation commands.Describe the current behavior
It is not possible for libraries to configure platform properties.
Arduino CLI version
63c44a4
Operating system
N/A
Operating system version
n/a
Additional context
Allowing the end user to set platform properties on a sketch level would be another solution.
Related
Issue checklist
The text was updated successfully, but these errors were encountered: