How To Define Custom Board within Project

I had some trouble understanding what to do exactly, so I figured I’d try to help by answering the question of how to define a board from within the project files and not from within the .pio General file locations.

  • find a reference board project .json file using a similar package framework .json file for a board found in the C:\Users\{$USER}\.platformio\platforms\{$PLATFORM}\boards files.

  • once you have a project setup. create a folder called “boards” in the root project directory chosen.

  • copy the reference board .json file into the “boards” folder,

  • rename the file to whatever you want to call the board,

  • edit the .json to meet your needs.

And that’s it. Your custom board will be referenced when the project is built.
reference link : Custom Embedded Boards — PlatformIO v6.1 documentation

my example :

1 Like

This makes the board only available in the current project.

If you want to make it globally available for all projects, use the path
C:\Users\<USERNAME>\.platformio\boards

This folder will remain even if you delete or reinstall the platform.

That’s correct. For my instance, the goal was to have all documents provided inside a github folder to be cloned so the work flow was :
Clone repo, edit code as needed, upload, and you’re done.

1 Like