Custom board definitions disappeared

I’m wondering if there’s a known cause to this. I appear to have lost a few of my custom board definitions. I’ve made my new ones in .platformio/platforms/ststm32/boards where I’ve found the other boards. I was building both in the CLI and in CLion and I tried to see if debugging was possible through CLion but it wasn’t since I don’t have the right hardware. But I don’t feel like anything like that should explain this.

And seemingly all of a sudden I got “Unknown board ID” when I tried building. I look in the boards directory and I don’t see any sign of the board files I’ve put there previously, it looks like it’s a clean install. Now I only had 3 custom boards luckily so it’s not a big loss.

I guess there are 2 questions really.

  1. Is there a known cause behind this with either platformio or CLion?
  2. How should I manage my custom boards in the future?

That’s not really a safe way to put them, since platforms may be updated and old versions may be removed.

On the other hand, PlatformIO turned off “auto update platforms” a long time ago, so either you’re on a really old PIO core version or something happened that caused PIO to install a differing ststm32 platform version, e.g. by opening a project that pinned it to a different version.

Per documentation (1, 2), you should either put them in the project’s boards/ directory (create this folder if it does not exist) or <home folder>/.platformio/boards.

For maximum portability of projects between different computers, I always recommend putting it in the project’s boards/ folder.

1 Like