I have tried in addition the “fixes” such as:
debug_init_cmds =
set CPUTAPID 0x2ba01477
target extended-remote $DEBUG_PORT
$INIT_BREAK
monitor reset halt
$LOAD_CMDS
monitor init
monitor reset halt
and
upload_flags = -c set CPUTAPID 0x2ba01477
From debugging-of-stm32f103-clone-bluepill-board-wrong-idcode. However, neither of them seemed to work.