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 # use hardware reset, connect under reset # connect_assert_srst needed if low power mode application running (WFI...) reset_config srst_only srst_nogate connect_assert_srst set CONNECT_UNDER_RESET 1 # brutally overwriting detected flash size with 128KiB (OpenOCD > 0.10.0) set FLASH_SIZE 0x20000 source [find target/stm32f1x.cfg] $_TARGETNAME configure -rtos auto