This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430-GCC-OPENSOURCE: GDB Target Remote Fails Connection Closed

Part Number: MSP430-GCC-OPENSOURCE
Other Parts Discussed in Thread: MSP430FR2675, MSP-TS430PT48A, MSP-FET

I'm following the instruction in section 4.6 of SLAU646F.  Using a command line interface on macOS, I am able to execute `make debug` for the generic MSP430 example project.  It builds successfully, but when I try to launch the GDB debugger it fails.  From the GDB installation point `./bin/gdb_agent_console msp430.dat` seems to go okay with the displayed status of "Waiting for client."

In a new terminal window I then run `make debug`, which completes successfully with the gdb prompt.

Next, as per the instructionsin section 4.6 of SLAU646F, I issue the command target remote :55000, but connection immediately closes.  Any ideas?

  • I don't know but I was able to replicate the problem. gdb_agent reported:

    gdb_agent_console msp430.dat
    CPU Name             Port
    --------             ----
    msp430              :55000
    
    Starting all cores
    CPU Name             Status
    --------             ------
    msp430               Waiting for client
    msp430               Client connected...Connecting to Target
    Couldn't find any connected USB FETs!
    Failed to initialize FET on TIUSB port. Aborting.
       MSP430 Error :Could not find MSP-FET430UIF on specified COM port
    Connection failed...exiting
    

    gdb had no trouble connecting to mspdebug which is what I usually use. (Target was a Launchpad with a G2553.)

  • My part is the MSP430FR2675.  Could that be the problem?  My hardware setup is very simple with only an MSP-FET and MSP-TS430PT48A.

  • I find there is a quick start guide: https://www.ti.com/lit/ml/slau591c/slau591c.pdf?ts=1647440027437&ref_url=https%253A%252F%252Fwww.google.com.hk%252F

    Can you follow it to check whether you have miss anything? Sorry, currently for GCC, we only have limited support.

  • Nothing new in slau591 that I can see.  When I start gdb_agent on Linux it doesn't check for a device. Or at least it doesn't care that one isn't connected.

    I thought there might be more to the msp430.dat file fed to gdb_agent but it is very short:

    # config version=3.5
    $ msp430
      msp430_drvr=msp430.dll
      msp430_port=TIUSB
      msp430_vcc=3.3
    $ /
    

    So it would seem that you need to edit that to specify the particular target being used. Documentation would be nice. slau646 discusses some of the gdb_agent options including editing msp430.dat to change the target Vcc but nothing about the port.

    I tried changing TIUSB to RF2500 (which works for mspdebug on this particular Launchpad) but it didn't help.

    This isn't encouraging: https://software-dl.ti.com/ccs/esd/documents/xdsdebugprobes/emu_xds_gdb_agent.html

    Note that "gdb_agent_console --help" results in a message where it refers to itself as xds_gdb_agent.

    mspdebug is probably the best bet since it can act as a gdb server. That is what I use.

**Attention** This is a public forum