STM32: Overwrite board variant in platformio.ini?

Thanks for the answer. For those searching along: This would be the corresponding platformio.ini:

[env:demo_f030f4]
platform = ststm32
board = demo_f030f4
framework = arduino
build_flags = -DARDUINO_DEMO_F030F4_16M