Basically it’s high time Custom platform packages per build environment · Issue #1367 · platformio/platformio-core · GitHub get’s implemented so this becomes easier.
You have modified your framework core files. Thus in the PIO architecture, you’ve modified the framework-arduinoteensy
package. These sources for these packages and the packages themselves are defined in the platform’s platform.json
file.
Example
So the actual clean way would be to fork the platform-teensy repository, modiy the platform.json
to point to a different package repository which you control, and in this manifest add a new version of the framework-arduinoteensy
and the download link to where you have your modified files.
Example from manifest.json
from bintray:
"framework-arduinoteensy": [
{
"sha1": "baa3e3c8e7e411b8f5f7918d11fecce08a7c531b",
"system": "*",
"url": "https://dl.bintray.com/platformio/dl-packages/framework-arduinoteensy-1.135.0.tar.gz",
"version": "1.135.0"
},
{
"sha1": "3cc0670966ce4fd855762f30ba05b2cc0541580b",
"system": "*",
"url": "https://dl.bintray.com/platformio/dl-packages/framework-arduinoteensy-1.136.0.tar.gz",
"version": "1.136.0"
},
...
Finally you must instruct your project to use the new platform
with the changes pacakges by saying
platform = <git link to your platform-teensy fork here>