-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug error #992
Comments
Well, did you check the TERMINAL tab to see why openocd is not starting? Also make sure you can launch OpenOCD from the command line just like we do. Every command we run, you can also run from the command line to make sure your GNU tools are properly installed, although that does not seem to be the problem. |
hi, [2024-03-05T11:53:43.118Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session connected. You can switch to "DEBUG CONSOLE" to see GDB interactions.
openocd -c "gdb_port 50000" -c "tcl_port 50001" -c "telnet_port 50002" -s /home/topeet/Desktop/gcc_stm32-master/gcc_stm32-master/Template/STM32F103_FreeRTOS -f /home/topeet/.vscode/extensions/marus25.cortex-debug-1.12.1/support/openocd-helpers.tcl -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/share/openocd/scripts/target/stm32f1x.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
CDLiveWatchSetup
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v38 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.231196
Error: init mode failed (unable to connect to the target)
in procedure 'init'
in procedure 'ocd_bouncer'
[2024-03-05T11:53:43.916Z] SERVER CONSOLE DEBUG: onBackendConnect: gdb-server session closed
GDB server session ended. This terminal will be reused, waiting for next session to start... I can't understand what the output here means? I think this is a normal output. What do you think? |
It looks like you just connected your stlink to the device incorrectly. Check connection first and retry with OpenOCD standalone openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/share/openocd/scripts/target/stm32f1x.cfg You should have no errors. The extension has no effect on this. |
Excuse me, is this command being used on the command line? I can connect to stm32 using this command on the command line. I have been really troubled for many days and I really hope to get your help。 The result after executing the command is: topeet@ubuntu:~$ openocd -f /usr/share/openocd/scripts/interface/stlink-v2.cfg -f /usr/share/openocd/scripts/target/stm32f1x.cfg
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 1000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v38 API v2 SWIM v7 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.231196
Info : stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints
|
hi
I hope to use the Cortex-debug tool to debug STM32. My system is Ubuntu 20.04 and I have chosen gdb-multiarch as the debugging too.
The content of my launch.json file is as follows:
After clicking debug, an error message appears as follows:
No matter how I change the configuration file, there will always be an error message
Failed to launch OpenOCD GDB Server: Timeout
.But what surprised me was that it could be debugged and downloaded normally from the command line.
I am very much looking forward to receiving your help. Thank you!
The text was updated successfully, but these errors were encountered: