Local Arduino framework

Hi there

I’d like to bring whole Arduino core (samd) to my workspace in order to make a few patches to it that are specific to my project.

I was thinking to include my fork of Arduino core (and all dependencies if needs to) as a Git submodule to my project and configure platfromio to resolve framework not from ~/.platformio/packages/ but from my workspace. Is there a way to do that?

I’m on platfromio v5.0.0 and using custom board definition.

Thank you.

Then what you want is to use platform_packages.

  1. Make a copy of the used, unmodified Arduino core (take it from e.g. ~/.platformio/packages/framework-arduino-samd...)
  2. Apply your patches
  3. Upload the new version to a git repo (alternatively: zip it and upload it somewhere where you have a direct download link)
  4. Tell PlatformIO to use your version of framework-arduino-samd... (whatever the underlying core package is really called, can also be seen in the initial dependency graph at compilation) in the platformio.ini by stating
platform_packages =
  framework-arduino-samd.. @ https://github.com/myuser/myfixedrepo.git

or equivalent zip download link.