set CHIPNAME STM32F103C8Tx # Enable debug when in low power modes set ENABLE_LOW_POWER 1 # Stop Watchdog counters when halt set STOP_WATCHDOG 1 # STlink Debug clock frequency set CLOCK_FREQ 4000 # Some revisions of the Bluepills use a CS32F103C8T6 rather than the STM32Fx # MCU, which has a different CPUTAPID than the official STM32F103C8T6. As of # 2020-04-09, no upstream support in OpenOCD has been merged. You can uncomment # the following line as a workaround until your OpenOCD supports this option: #set CPUTAPID 0x2ba01477 # Set the default reset option in cases where "SRST=none" is not used for make if { ![info exists SRST_OPT] } { set SRST_OPT srst_only } # use hardware reset, connect under reset # connect_assert_srst needed if low power mode application running (WFI...) reset_config $SRST_OPT srst_nogate connect_assert_srst set CONNECT_UNDER_RESET 1 source [find target/stm32f1x.cfg] $_TARGETNAME configure -rtos auto