Using more then one ST LINK v2 simultaneously.

Sysprogs forums Forums VisualGDB Using more then one ST LINK v2 simultaneously.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #20723
    victorian1990
    Participant

    Hi all!

    I have a problem with debugging two stm32 simultaneously.  I connect both of its to my personal computer and open two visual studio 2013(visualgdb version 5.3R8). Then i choose first st link v2 debugger in visualgdb properties of first visual studio window and second st link – in second. But when i begin to debug even first stm32, appears an error: open failed, abort , retry or ignore. Only when i take out one of st link debugger, stm32 can be debugged normally.

    Sorry if this question was in this forum, but i cant find such theme.

    Can somebody help me?

    p.s Tell me what information you need to help me and i will give it here.(pictures, versions e c t)

    p.s.s Sorry for my bad english:)

     

    #20726
    support
    Keymaster

    Hi,

    Please ensure you have the “USB devices” not “Debug methods” selected on the Debug Settings page of VisualGDB Project Properties. Otherwise VisualGDB won’t be able to tell apart between the 2 instances.

    If this still doesn’t help, can you confirm that the “Test” button works for both projects? If not, what is the error output?

    #20729
    victorian1990
    Participant

    Thanks for answer!

    I checked that i have”USB devices” selected on the Debug Setting page (U can look at screenshot).

    Note, that when i take out first ST LINK debugger,  second debugger works good. (Next screenshots tell what kind of error uccured and show sucsess message when remaining debugger works.) No matter

    what ST LINK i take out – first or second – remaining debugger works anyway. Maybe i need to update debugger’s firmware , use other software version or something else?

    I’ll be glad for any help.

    Attachments:
    You must be logged in to view attached files.
    #20735
    support
    Keymaster

    Hi,

    Thanks for the screenshots. It looks like a known issue. Unfortunately the ST-Link v2 has a bug that prevents it from reporting its USB serial number the way OpenOCD can read it. This has been fixed in ST-Link v2.1 (that is installed on most newer boards). Please either try upgrading your board, or check if there is a firmware update that will turn your ST-Link into v2.1.

    You can also try locating and applying ST’s patches to OpenOCD that resolve this, however in our experiments they introduced strange side effects, so we ended up not including them in our OpenOCD build.

    #20845
    JoeWright
    Participant

    I don’t suppose there’s been any updates?

    I’m so confused by the ST-Link v2.1 as it doesn’t seem to be sold in the UK, or even listed on the ST website apart from support pages.  I’ve updated the firmware of my two ST-Link v2’s but I can’t use them at the same time with VisualGDB as described above.

    I suppose I could try the OpenOCD patches.  What were the issues you were finding with them?

     

    Thanks, Joe

    #20851
    support
    Keymaster

    Hi,

    You could try cloning this repo and building it (this might be non-trivial, sorry). Please check all the branches, as the master branch might not be up-to-date.

    If you get it to build, we can provide instructions on modifying the scripts to specify the ST-Link v2 serial numbers so that OpenOCD can understand them.

    Another option would be to try one of the Olimex debug probes. They are based on the FT2232 chip that basically exposes the low-level JTAG and SWD interfaces directly to OpenOCD, so all the functionality that works with ST-Link will also work with their devices.

    #32079
    MartinF
    Participant

    Hello,

    I’m tagging on to this thread because I’m having the same issue of not being able to run multiple STLINK Debuggers simultaneously, and I believe both my debuggers are V2.1 (Specifically V2.J39.S7 which is the latest released from ST as of 1-26-22). I’ve also attached screenshots, since both my units should be V2.1 I would expect this to work based on the information previous to the thread.

    Thanks,

    Martin

    Attachments:
    You must be logged in to view attached files.
    #32104
    support
    Keymaster

    This looks like an issue between OpenOCD and a particular ST-Link. You can try extracting the OpenOCD command line used by VisualGDB from the first line in the settings test window, running it manually, and cross-referencing the serial number command against the serial number shown in the Device Manager.

    If OpenOCD fails to recognize the device despite the correct serial number, you can try using other OpenOCD builds (e.g. the ST fork).

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.