cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE: debug multiple instances of a project?

Andrew Neil
Evangelist III

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?

9 REPLIES 9
Andrew Neil
Evangelist III

Hmmm ... even with separate Workspaces, it doesn't work:

0693W000008yCAjQAM.png 

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?

Radosław
Senior II

Just change telnet port for one of projects, and set proper SN for debug probe.

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

Radosław
Senior II

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.

I think you would need separate GDB server instances for each debug instance, with different port settings.

How would you do that?

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

Of course the source code would be shared - that's the whole point.

Andrew Neil
Evangelist III