VSCode ST-Link GDB Server error #278
Replies: 2 comments 5 replies
-
So I found a solution but I'm wondering if something has changed in the stlink-gdb-server defaults. I added the -k option, to initialize under reset, along with the --swd option. Word of note: if you want to make a change to the default board GDB configurations already in mbed-ce, you need to place the set(...) statement between include(mbed-os/tools/cmake/app.cmake) and the add_subdirectory(mbed-os) statements. Again, has anybody else had this problem and do we need to alter the mbed-os/targets/upload_method_cfg files? |
Beta Was this translation helpful? Give feedback.
-
I think we can close this now as #279 has been merged |
Beta Was this translation helpful? Give feedback.
-
I'm getting the following failures of the stlink-gdb-server in VS Code on a NUCLEO_H743ZI2.
Windows 11 Pro, VS Code 1.89.0, STM32CubeIde 1.15.1 (full install), updated on-board ST-Link firmware V3J15M6
The first two are the common fails with the first being more prevalent. Every once in a while (~ 1 in 10) it seems to initialize properly, as can be seen in the third listing. It seems to be an issue with resetting and/or halting the target?
I tried reducing the SWD frequency from 24000 to 8000 kHz like STM32CubeProg uses but it doesn't seem to matter.
I was trying to debug an network application where ::get_instance_name() returning NULLs on this board but to simplify matters I'm using the mbed-ce-hello-world example.
One thing I tried because it seems to be a processor reset/halt issue and the line "Target connection failed. Try connecting under reset" in the third listing below was to hold reset on the Nucleo board until stlink-gdb-server gets passed the "Target connection mode:..." point and it retries reset and lowers the COM frequency. Letting go of reset at this point then proceeds and recognizes the target processor. Things proceed to program and then reconnect to stlink-gdb-server for mbed-ce-hello-world but my app fails again as it switches back to the stlink-gdb-server.
Anybody else having these problems and have any insight?
Beta Was this translation helpful? Give feedback.
All reactions