I am trying to do a remote upload of a custom board (A variation of arduino-due board that i call duelow).
This board is already added to the arduino-sam framework list of boards, and the linker scripts locally. So if I do a pio run -t upload everything works.
But I would like to be able to upload a project to a remote computer that only has default platformio installed. If i simply do a pio remote run -t upload -e release I get the Error: Unkown board ID 'duelow'
I am seeing this may be fixed with a Custom target that uses my board. Here they talk about a custom target for a board, but it never creates target. It only declares the board.
I am getting confused with what would the term “Target” be in these two contexts.
This is my project.ini
You need to make the project more portable – requiring to make local modifications to PlatformIO packages or platforms is not good practice and can lead to problems like these.
E.g., instead of copying the board JSON to the .platformio/platforms/atmelsam/boards folder, you can locally create a boards in the project and have the board JSON file in there. Same effect.
Further instead of copying the variant folders into .platformio/packages/framework-arduino-sam/variants, take advantage of the possibility of specfiying a custom variants directory in the platformio.ini, since the builder scripts supports this.
Thank you for your help, I waited to test the solution to mark it as such. I leave here all I did for future users
In all the subprojects that I need to remotely install I created a boards folder and a custom_variants folder. The first one had my custom boards json files, and the second I just copied the arduino_due_x folder I had in .platformio/packages/framework-arudino-sam
only code I changed was adding the board_build.variants_dir = custom_variants line in my platformio.ini file