Language: EN

platformio-unknown-board-id

How to solve the Unknown board ID problem in PlatformIO

Today we have a little tip about PlatformIO and how to solve 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 usually occurs when changing boards in the middle of a project, or when moving the project to another computer.

Generally, the first thing we should do is check that we have the name (ID) spelled correctly in the ‘platform.ini’ file of our project. To do this, check the name of the board in the platformio board manager.

If you have the board ID configured correctly, and still get the “Unknown board ID” error, it is possible that your platforms file is corrupt. This has happened to me several times.

It may never happen to you. It may happen to you all the time. But in any case, the problem can usually be solved by deleting the “.platformio/platforms” folder from our system.

This folder contains the configuration of the platforms used by PlatformIO. By deleting it, we will simply force PlatformIO to download and install the necessary platforms for the project again.

To do this, simply,

  • Close PlatformIO
  • Open the 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 we 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 little luck, you will have gotten rid of the annoying “Unknown board ID xxxx” problem in PlatformIO.