Apparently that’s the case, thanks for the suggestion. If I upload via STlink, the serial data that I expected to be sent over USB appears on PA9.
However, according to https://wiki.stm32duino.com/index.php?title=API#Serial_.26_USB_Serial, Serial.print commands should print over USB CDC. This isn’t working in my case. Should I manually specify to use some bootloader somehwere in the pio options?
Edit: if I upload via DFU, the LED doesn’t even blink.