i have already created a custom board definition for the arduinonrf5 framework.
For this board i’m need a changed variant. This is also already created and works if i copy them to the variants dir of the framework directory.
my qustion now is it possible to comple with vscode and platformio and load the variant from project scope. Like using the boards dir in the project directory. Or is ther another option to syncronize changes to that between multiple developers and computers ?
It seems that if you need to add your custom ‘variant’ then you can use build.variants_dir in your pio.ini. At least this is achievable with Arduino with STM32Core because there is a selection code in its build script.
Added 3 hours later: this is a little bit more complicated. In order to add your own variant to your Project space you need to do the following three things:
Create your custom board manifest in /boards folder of your project.
Set in the board manifest “variants_dir”: “variants” property that points to the variants folder at your project.
Create variants folder and put there folder with name specified in “variant”: “xxxxx” property of your custom board manifest. Put into this folder all the board specific files.
After PIO can argues that it can’t find linker (LDscript) but it is not true, the script will be executed.