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 :