I’m quite new to PIO so I may have missed something.
I have a custom board based on the MCU in the title but I think I’ve discovered that it’s not among the supported MCUs. Is there any way for me to flash this board using PIO?
However, to solve your problem, just duplicate the only STM32F0 definition disco_f051r8.json into your project’s boards/ folder with the obvious edits in regards to the chip name and the Arduino variant available per this.
I’ve setup the board definition and example Arduino core for you at