(gdb) target extended-remote localhost:3333
A program is being debugged already. Kill it? (y or n) y
Remote debugging using localhost:3333
0x08000a50 in HAL_RCC_OscConfig (RCC_OscInitStruct=0x8000c40 <HAL_RCC_OscConfig+952>) at Drivers/STM32F1xx_HAL_Driver/Src/stm32f1xx_hal_rcc.c:503
503 RCC_Delay(1);
$ openocd -f interface/jlink.cfg -f target/stm32f1x.cfg
Open On-Chip Debugger 0.11.0 (2021-11-18) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "jtag". To override use 'transport select <transport>'.
Info : DEPRECATED target event trace-config; use TPIU events {pre,post}-{enable,disable}
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Warn : Failed to open device: LIBUSB_ERROR_NOT_SUPPORTED.
Info : J-Link V9 compiled Jun 2 2222 22:22:22
Info : Hardware version: 9.40
Info : VTarget = 3.293 V
Info : clock speed 1000 kHz
Info : JTAG tap: stm32f1x.cpu tap/device found: 0x3ba00477 (mfg: 0x23b (ARM Ltd), part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32f1x.bs tap/device found: 0x06414041 (mfg: 0x020 (STMicroelectronics), part: 0x6414, ver: 0x0)
Info : stm32f1x.cpu: Cortex-M3 r1p1 processor detected
Info : stm32f1x.cpu: target has 6 breakpoints, 4 watchpoints
Info : starting gdb server for stm32f1x.cpu on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x08000a50 msp: 0x20000420
Info : device id = 0x10036414
Info : flash size = 512kbytes
Info : dropped 'gdb' connection (error -400)
Info : accepting 'gdb' connection on tcp/3333
Info : stm32f1x.cpu: external reset detected
Info : dropped 'gdb' connection (error -400)
Info : stm32f1x.cpu: external reset detected
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x08000a4e msp: 0x20000420
Info : dropped 'gdb' connection (error -400)
Info : stm32f1x.cpu: external reset detected
Info : accepting 'gdb' connection on tcp/3333
target halted due to debug-request, current mode: Thread
xPSR: 0x21000000 pc: 0x08000a50 msp: 0x20000420