Skip to main content
Graduate II
March 31, 2025
Question

multiple debugger connection to same target using stlink

  • March 31, 2025
  • 1 reply
  • 537 views

what is the best/easiest way to have multiple connections to the same debug target using stlink as a debug adapter, i mean during an active debug session within the cubeide have another PC tool (custom built) that can interract with the hw, like read/write memory and registers.

Theoretically the stlink can be shared via the stlinkserver, however its usage is not well documented (or at least i'm not aware of it)

Some possibilities i could think of:

1. talk to the stlinkserver directly somehow

2. next to the active gdb connection from cubeide have a telnet session from the other tool

3. use 2 instances of openocd, one from cubeide and the other for the tool (gdb based)

4. others?

I would prefer gdb based solution. Performance is relevant as i need to transfer large amounts of data

 

Any hints, ideas?

    This topic has been closed for replies.

    1 reply

    Graduate II
    April 1, 2025

    What are the "multiple" tools that need to talk to your device?

    Graduate II
    April 2, 2025

    as i mentioned in the original post, the main tool is the cube ide, and the other one is a custom built one, it doesn't exist yet, just a proof of concept to evaluate what would be the best way to do this, but if someone already did something similar, or if there is a recommended way to do this, that would be helpful.
    So far i tried 2. and 3. both of them work, i need to evaluate from performance point of view which one is better, i don't think it is worth messing with 1. as it is not documented and i don't think it is meant for 3rd parties.

    Graduate II
    April 3, 2025

    of course i had to mess with 1. i just pulled out the hla and stlink_usb files from the openocd project and put it in my project, now i can talk to the stlink server directly, the hla interfaces are exactly what i need, so this method also works, i have a feeling that this is the most performant way to do this, no middleman, just talk to the stlinkserver directly, openocd source is a good enough documentation for this. the hla driver is pretty much plug and play