Today we have a small tip about PlatformIO and how to resolve the “Unknown board ID xxxx” error when compiling a project for a specific board.
The “Unknown board ID” error occurs when PlatformIO cannot find the ID of the specific board being used in the project. This can happen for several reasons, and it usually happens to us after changing boards in the middle of a project, or when moving the project to another computer.
Generally, the first thing we should check is that we have the board name (ID) correctly written in the platformio.ini file of our project. To do this, verify the board name in the PlatformIO board manager.
If you have the board ID correctly configured and you still get the “Unknown board ID” error, it’s possible that your platforms file is corrupt. This has happened to me several times.
You may never encounter it. You may encounter it frequently. But in any case, the problem is usually solved by deleting the “.platformio/platforms” folder from our system.
This folder contains the configuration for the platforms used by PlatformIO. By deleting it, we are simply forcing PlatformIO to download and reinstall the necessary platforms for the project.
To do this, simply:
- Close PlatformIO
- Open File Explorer on your system
- Go to your user’s home folder
- Open the “.platformio” folder
- Delete the “platforms” subfolder (only this folder)
The next time you start PlatformIO, it will have to download the configuration files, so be patient while it downloads and reinstalls the files.
If you have followed these steps, and with a bit of luck, you will have gotten rid of the annoying “Unknown board ID xxxx” problem in PlatformIO.

