PlatformIO support #793
Replies: 1 comment 3 replies
-
Thank you, I am open to have pio support, it is a nice IDE. However, I don't use it much since it does have some difference with Arduino that does effect the compiling e.g prioritize library include path over core's one. Therefore my main concern is maintaing the pio compatibility, we can't guarantee to do so. People could start to complain when thing is not working. Previously, I got a user yelling and even lecturing me with laws that we have to support him since the library is listed on platformio index as compatible (which is indexed by pio crawler). They probably forgot that MIT license software comes with no warranty or whatsoever. TLDR, I would be happy to review if you are willing to do the PR. Though in the future when lack of maintenance causing too many support, we could revert this. |
Beta Was this translation helpful? Give feedback.
-
Many of you probably know platformio as an advanced alternative to the ArduinoIDE, for those who don't: https://platformio.org/ . PlatformIO also supports the nrf52 series but particularly its dependencies, like this "framework" repository, needs quite a few hacks to get running. Here is where platformio's dependency registry comes into play. It apparently takes this repository and then adds some compatibility files (mainly
library.json
andpackage.json
files) by some hidden scripting (?). The official "platform package" repository page also links to this very repository here, which does not have these modifications.I have scanned the needed modifications and successfully tested them in my personal fork here.
So, what would be needed?
A package.json in the root repository, see example here. E.g., the esp32 Arduino core repo also has one . Maintenance effort: bump semantic version number on every release
For all git submodule dependencies (nrfCrypto and TinyUSB), a
library.json
is needed and some additional linker stuff that is pio-specific, so shouldn't have an effect on the ArduinoIDE. Maintenance effort: 0 (?)for libraries/Adafruit_nRFCrypto, I already made a PR, see Add support for platformio Adafruit_nRFCrypto#6
for libraries/Adafruit_TinyUSB_Arduino, I already made a PR, see Add platformio compatibility Adafruit_TinyUSB_Arduino#336
All in all, the effort required to maintain support is probably minimal. Is this something that people/maintainers are interested in? The advantage would be that this nrf52 "framework"/Arduino Core can effectively be forked and used by platformio users, and thereby contributions made back to the framework - this is currently NOT possible since using the framework in platformio requires the changes made by the pio-repository (see, e.g. this discussion).
P.S.: To try for yourself if the changes suggested above work, include in your
platformio.ini
[env]
:The only further modification included in this repo is, that I updated the nrfCrypto and TInyUSB dependencies and made this small fix to get them working
Beta Was this translation helpful? Give feedback.
All reactions