I’d like to do some development work on Adafruit’s core for SAMD, by forking their repo locally and tinkering with the code. (I have improvements to wiring.cpp and reset.cpp…)
I can’t seem to get PlatformIO configuration to recognize the local repo
PlatformIO seems to want to clone it… where will it go? will it keep it separate from the official one? Can I keep it from doing that - I’d rather it work right out of the repo (so I can test changes I’m making easily.)
~/.platformio/packages/framework-arduino-samd-adafruit/ contains an extra file: package.json that isn’t in the source repo… Where does this file come from? Do I need to create it and put it… where?
to avoid PlatformIO copying it into ~/.platformio/packages/framework-arduino-samd-adafruit. See docs
PlatformIO will reject to use a new framework package if it does not have a package.json in it. You absolutely need it. And yes, as a base you can just use the current ~/.platformio/packages/framework-arduino-samd-adafruit/ and then just change the value of the version field.
Thank you! That worked, though I couldn’t get ~ to work as part of the path, so I just put in the whole absolute path.
Since package.json isn’t part of the original repo… I’m just wondering where those get created and archived. Is this just some magic with the PlatformIO package system? I had no problem copying it into my tree… though I now have a file there that git doesn’t control.
The package.json are usually created by hand by the one creating and uploading a package. I see that in the documentation, the package.json isn’t clearly documented, there is a schema file though.The highly related library.json is documented, and it shares many fields. Though really, a “name” and “version” field are usually enough. I recommend to always look at existing package.json files from frameworks like