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
Multiple SWO (OpenOCD tpiu_swo_trace) Connections for External OpenOCD Server #853
Comments
Thanks for reporting the issue. WSL was taking far too long to make the connection succeed and we would timeout and try again. We were also not expecting multiple connections to be possible. I don't have a proper WSL setup to test but could you try the latest pre-release from the marketplace? v1.11.1 It should be available in a few minutes or run Please let us know if it is working |
Just wanted to say I have seen multiple copies of SWO output in my setup which is vanilla windows 11. I am using openocd from ST, an stlink v3, and f4 and g4 flavors do stm32. Language is rust. I would see in the terminal that multiple traces were accepted. My solution was to exit and reload things and it would generally work the 2nd time. |
@Jeremin Are you using a Docker container inside WSL2? VSCode seems to have a bug where they misidentify certain extensions and issue that message. All the dependencies including the peripheral viewer work both on the host side or the client side and marked as such but VSCode for some reason is confused. The peripheral viewer even works in a browser. I updated the peripheral-viewer (please install the latest v1.4.4) and then try to uninstall and reinstall the Cortex-Debug v1.11.1 If this does not work, we may have to configure your docker container. I can probably help with that |
@fitch22 If you are seeing this issue with no WSL, I am very surprised but, the pre-release v1.11.1 should also work for you if you want to try. |
v1.11.1 seems to be working for me. I have not seen any of the multiple SWO outputs yet. However, it never happened all the time with any previous version. I will definitely let you know if I see it again, and I will capture as much information as I can. FYI, I do have WSL2 installed, but it is not part of my debug sessions. That is done just in Windows 11. Also, I have VMWare Workstation 16 installed. I know that VM installs various network interfaces, and could potentially do something causing the timeouts. |
Thanks for testing. I am going to close this now. |
Hello there
First off: Thanks for all the great work you are doing!
To my issue: I am using WSL2, STM32, STLinkV2, OpenOCD and Cortex Debug v1.10.0.
The problem I am facing is: SWO works, however it seems Cortex Debug makes a seemingly random amount of TCP connections (
tpiu_swo_trace
) to the OpenOCD debug server for the SWO decoder, which then results in the debug output having the same text multiple times. Some times it keeps the number of connections constant (I have never seen less than 8 connections), sometimes more are added during the run. I also verfied that SWO works fine with OpenOCD + telnet client or the STM32 Cube programmer.Let me know if you need additional information.
Launch Configuration
Additional Information
"preLaunchTask": "WSL launch build_debug"
starts OpenOCD on the Windows Host and builds the firmware."postDebugTask": "WSL kill openocd"
kills the OpenOCD process after debugging.${env:GDB_REMOTE_TARGET}
is the IP of the Windows host.OpenOCD Trace
SWO Output
The text was updated successfully, but these errors were encountered: