如何透過ST-LINK V2燒錄程式(OpenOCD)



$ sudo openocd -f /usr/local/share/openocd/scripts/interface/stlink.cfg -f /usr/local/share/openocd/scripts/target/stm32f1x.cfg -c "program main.bin reset exit 0x8000000"
  Open On-Chip Debugger 0.11.0-rc1+dev-00010-gc69b4deae-dirty (2020-12-27-01:20)
  Licensed under GNU GPL v2
  For bug reports, read
  Info : auto-selecting first available session transport "hla_swd". To override use 'transport select '.
  Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
  Info : clock speed 1000 kHz
  Info : STLINK V2J17S4 (API v2) VID:PID 0483:3748
  Info : Target voltage: 3.203137
  Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
  Info : starting gdb server for stm32f1x.cpu on 3333
  Info : Listening on port 3333 for gdb connections
  target halted due to debug-request, current mode: Thread
  xPSR: 0x01000000 pc: 0x08000100 msp: 0x20005000
  ** Programming Started **
  Info : device id = 0x20036410
  Info : flash size = 128kbytes
  ** Programming Finished **
  ** Resetting Target **
  shutdown command invoked