set TRANSPORT hla_swd source [find interface/stlink-v2.cfg] source [find target/stm32f1x.cfg] #reset_config none separate #reset_config srst_push_pull #separate trst_push_pull #reset_config srst_nogate init reset halt halt 20 reset sleep 10 reset halt flash write_image erase main.bin 0x08000000 sleep 10 reset sleep 10 arm semihosting enable reset run sleep 10 #shutdown