2021-03-29 07:38 AM
either to debug multiple instances of the same project; eg, two BLE peripherals
or to debug multiple projects; eg, a BLE Central and a BLE peripheral.
In the latter case, I guess you could put each one in a separate Workspace - but that doesn't help in the former case.
This can't , surely, be an uncommon situation?
2021-03-29 07:57 AM
Hmmm ... even with separate Workspaces, it doesn't work:
this is on a B-L072Z-LRWAN1 with the on-board ST-Link converted to a J-Link
https://www.segger.com/products/debug-probes/j-link/models/other-j-links/st-link-on-board/
Is this just a "feature" of the J-Link conversion, or would the original ST-Link be just the same?
2021-03-30 12:02 AM
Just change telnet port for one of projects, and set proper SN for debug probe.
2021-03-30 02:34 AM
Yes - SN set already.
Where does the port need changing - just in the Project? also for the J-Link?
Is there a recommended "secondary" port number?
Note that this "just works" with 2 instances of Segger Ozone - apart from specifying SN, nothing else needs fiddling with.
And it still leaves the question of how to debug 2 instances of the same project
2021-03-30 02:55 AM
Same project? it will be very hard to manage, source code will be shared, the best way will be a copy of this project, and two instances od CubeIde.
2021-03-30 03:05 AM
I think you would need separate GDB server instances for each debug instance, with different port settings.
2021-03-30 03:16 AM
How would you do that?
2021-03-30 05:32 AM
With a debugger script, I suppose ... Dunno how to do that within CubeIDE, don't use it.
But as described here: https://sourceware.org/gdb/onlinedocs/gdb/Connecting.html
Section 20.1.3, remote connection commands
...
target remote local-socket
e.g.
target remote host:port
target remote [host]:port
target remote tcp:host:port
target remote tcp:[host]:port
target remote tcp4:host:port
target remote tcp6:host:port
target remote tcp6:[host]:port
2021-03-30 06:01 AM
Of course the source code would be shared - that's the whole point.
2022-07-13 01:12 AM
Someone else with the same issue: