Closed NickolasLapp closed 2 years ago
People generally have the opposite problem. NodeJS/OS tells us port(s) is busy when it is not.
In this case, we should have detected that ports 5000-50002 are busy and hopped onto new/unused ones.
I have a Mac but upgraded it over the weekend to 12.1 Hopefully, we can duplicate this. We should be able to do that using plain javascript (NodeJS) with no VSCode involved.
Thanks for reporting this problem
Found the issue. I can use nc
(netcat) to create a server and our extension does indeed think it is free. It is because on 0.0.0.0 it is reported as free but not on 127.0.0.1. We do check both now... and I remember this used to be different. Now we check both. I have two sessions (I don't have two JLinks)
Launching gdb-server: /Users/hdm/cypress/rtt/cyopenocd-build/bin/openocd -c "gdb_port 50000" -c "tcl_port 50002" -c "telnet_port 50004" -s /Users/hdm/rtt/Hello_World -s /Applications/ModusToolbox/tools_2.3/openocd/scripts/ -f /Users/hdm/.vscode/extensions/marus25.cortex-debug-1.3.1/support/openocd-helpers.tcl -f openocd.tcl
Above was OpenOCD -- used up 5000-5004 and the following was JLink avoiding each other
Command line: -singlerun -nogui -if swd -port 50005 -swoport 50006 -telnetport 50007 -device CY8C6xx7_CM4_sect256KB -rtttelnetport 19021 -rtos GDBServer/RTOSPlugin_FreeRTOS.dylib
-----GDB Server start settings-----
GDBInit file: none
GDB Server Listening port: 50005
SWO raw output listening port: 50006
Terminal I/O port: 50007
It will be fixed in the next pre-release (due out in a couple of days) if you are subscribed to that
That's awesome! Really appreciate the support. I'll make sure to subscribe to the pre-release and confirm it is fixed then.
The fix is available as a pre-release 1.3.2. Thank you for reporting this. I hope you can verify the fix
You can opt-in and install the pre-release right from VSCode extensions tab.
I'm running into an error regarding port assignment when simultaneously debugging two devices with cortex-debug. The first debugger opens fine, using ports 50000, 50001, 50002 (
) but attempting to open a second debugger to attach to a different JLink USB device results in a port confilct:
I am on version 0.4.10, Mac OS X 11.6.2.
I saw this similar issue: https://github.com/Marus/cortex-debug/issues/117 which appears to be resolved, so not sure what I'm running into here.
Also of note, I do see the port in use:
Please let me know if I can provide any more information or help in resolving this problem!