This is one way to get the output without serial.
But I use it only in platformio, I cannot comment about Arduino IDE.
[EDIT] If you are using a chinese clone, you can try my fork that is simplified and adapted to stlink v2.1