Try remapping the SWJ to SWD.
document RM0008 31.4.2
https://github.com/libopencm3/libopencm3/blob/master/lib/stm32/f1/gpio.c
This should do it in libopencm3:
gpio_primary_remap(AFIO_MAPR_SWJ_CFG_JTAG_OFF_SW_ON, 0);
I have tried this but it seems like it didn't solve the issue. I still need a debugger to see the SWO output...
https://git.sr.ht/~mronetwo/spi-to-uart-freertos/commit/2744b1999205728ffdf22d4901246c7531b04972