[SOLVED] GDB Waiting for connection ...

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] GDB Waiting for connection ...

    I'm debugging custom hardware that has a ST32GM431C8 MCU and am connected using a J-Link. My connection to the hardware is the 5-wire JTAG. When running using Keil MDK5 I have a problem in which the Keil debug windows work fine until I execute a specific version of code then the windows get trashed and I cannot debug. I was hoping to try the GDB debugger with J-Link (I'm new to GDB). When I launch either the command line program or the GUI version I get "GDB waiting for connection..."
    I was hoping that I could use the GDB command line version with J-Link to debug to see if my problem was related to the Keil environment or if I have another problem. Here is what get's displayed by GDB:

    Source Code

    1. Verify download: off
    2. Init regs on start: off
    3. Silent mode: off
    4. Single run mode: off
    5. Target connection timeout: 0 ms
    6. ------J-Link related settings------
    7. J-Link Host interface: USB
    8. J-Link script: none
    9. J-Link settings file: none
    10. ------Target related settings------
    11. Target device: Unspecified
    12. Target interface: JTAG
    13. Target interface speed: 4000kHz
    14. Target endian: little
    15. Connecting to J-Link...
    16. J-Link is connected.
    17. Firmware: J-Link EDU Mini V1 compiled Feb 18 2021 11:25:23
    18. Hardware: V1.00
    19. S/N: 801020066
    20. Feature(s): FlashBP, GDB
    21. Checking target voltage...
    22. Target voltage: 3.30 V
    23. Listening on TCP/IP port 2331
    24. Connecting to target...
    25. J-Link found 2 JTAG devices, Total IRLen = 9
    26. JTAG ID: 0x4BA00477 (Cortex-M4)
    27. Connected to target
    28. Waiting for GDB connection...
    Display All
    Thanks --
  • What you have sent is not the output of GDB but GDBServer.

    GDB: GNU debugger. 3rd party command line debugger.

    GDB remote protocol: Generic protocol used by GDB to communicate with a GDBServer.

    GDBServer: Translates from GBD remote protocol to vendor specific ApI pf debug probe.

    Just starting GDBServer does not get you anywhere. You also need a GDB setup.
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.
  • Is there a Windows version of GDB? I see MinGW is quite old. If what is needed is a setup with GDB and GDB Server I am prepared to do that I'll just need help pointing in the right direction. I looked at GDB from GNU but if I don't have to generate the whole build environment for GNU I'd prefer the easier path.
  • Google: “arm gcc toolchain”
    and you will end up here:
    developer.arm.com/tools-and-so…ools/gnu-toolchain/gnu-rm

    Comes with everything:
    gcc, g++, gdb, ...


    BR
    Alex
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.