cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE: debug multiple instances of a project?

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?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
This discussion is locked. Please start a new topic to ask your question.
9 REPLIES 9

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?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
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

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
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?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

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.

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Someone else with the same issue:

https://community.st.com/s/question/0D53W00001fQaKnSAK/stm32cubeide-multiple-stlink-debug-of-same-project

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.