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.

msp 430 gdb

Other Parts Discussed in Thread: MSP430F2013

I have downloaded and run the Red Hat MSP430 Linux development tools, msp430-gcc-full-linux-installer-4.0.1.0.run. The C compiler runs successfully when executed with the LEDBlink sample code. My problem comes when I try to run the gdb debugger to download the object file resulting from the compiler (msp430f2013.out). I have attached a screen capture of the result of starting the debugger. It appears that some Python libraries are missing. Is there a list of the dependencies required for mspgdb to run? ]

  • Hi Craig,

    There is no additional required libraries. Everything should be supported by default. You have probably already seen the attached MSP430 GCC User's Gude, please go through it again to ensure you are trying to download the *obj correctly.
    www.ti.com/.../slau646a.pdf
    Also can you reattach the screen capture? Its not visible on my end.

    Please let me know if the issue still persist and I will try to recreate the problem.

    Regards,
    Charles O
  • Hi Charles,

    Here is the screen shot, please let me know if additional information is needed. Sorry it took a couple of days to reply to you. Thanks for taking the time to look into my problem. Craig Ross

  • Hi Craig,

    Got the screen shot sent to me by the support back channel.

    Please be patient as I try to install Linux and recreate the problem.

    Regards,

    Charles O

  • Thanks Charles. Please let me know if additional information is needed.

  • Hi Charles,

    A couple of additional details: The GCC installer that I downloaded was msp430-gcc-full-linux-installer-4.0.1.0.run, from the TI web site. My computer is running Mint Linux, 17.2. The computer has both Python 2.7 and Python 3.0 installed, though 2.7 is the default. From the initial error message, Python or at least some Python libraries are not where the gcc installer expect them to be (in the /opt directory). I don't know if this additional information will help. I did not enter any command line options/parameters when I ran the installer, and now I'm wondering if I ran the installer as 'root'.

    Thanks,

    Craig Ross

  • Hi Craig,

    That is most likely the cause of the problem. Can you add the current python directory to GCC and try the debugger again?

    Regards,
    Charles O
  • Hi Craig,

    Did you try changing the directory? did that fix the problem?

    Regards,
    Charles O
  • Hi Charles,

    I apologize for not responding earlier, but I've been engaged in a couple of activities unrelated to the MSP430 problems. I mentor a local high school robotics club in the afternoon, and our kids and grandkids are coming to visit for the weekend and part of next week.

    It may take a few days to return to troubleshooting the problem, please be patient as I value your assistance.

    Craig

  • Hi Charles,

    Our guests are gone now and I spent a little time getting back to my msp430 gdb problem.

    First, I uninstalled all of the MSP430 S/W and did a re-install, following the notes in SLAU646, the MSP430 GCC User Guide, installing to the /opt/ti/gcc directory. Incidentally, my O/S is Linux Mint 17.2, which is based on the LTS Ubuntu Linux.

    Second, I added /opt/ti/gcc/bin to the PATH variable so the tools are visible throughout the system.

    Next, I created a TI-MSP430 "working" directory at ~/projects/TI-MSP430/cgrCode to hold my source code, and copied the "blink.c" example and the associated makefile to this directory. I edited the makefile to make the GCC and SUPPORT variables point to the correct locations.  I successfully compiled the blink.c example by using make all.

    Now, before starting msp-elf-gdb, I ran gdb_agent_console msp430.dat. The result of starting the console agent was that port :55000 was identified:

    cgr@Robotics-Dell ~/projects/TI-MSP430/cgrCode $ gdb_agent_console /opt/ti/gcc/msp430.dat

    Successfully configured /opt/ti/gcc/msp430.dat

    CPU Name Port

    -------- ----

    MSP430 :55000

    Starting all cores

    CPU Name Status

    -------- ------

    MSP430 Waiting for client

    MSP430 Client connected...Connecting to Target[ 2562.079568] ti_usb_3410_5052 2-1.2:2.0: TI USB 3410 1 port adapter converter detected

    [ 2562.080079] usb 2-1.2: TI USB 3410 1 port adapter converter now attached to ttyUSB0

    When I started msp430-elf-gdb I received the following screen message:

    Could not find platform independent libraries <prefix>

    Could not find platform dependent libraries <exec_prefix>

    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]

    'import site' failed; use -v for traceback

    Python Exception exceptions.ImportError No module named gdb:

    /opt/ti/gcc/bin/msp430-elf-gdb: warning:

    Could not load the Python gdb module from `/opt/redhat/msp430-15r1-105/i686-redhat-linux/share/gdb/python'. (2)

    Limited Python support is available from the _gdb module.

    Suggest passing --data-directory=/path/to/gdb/data-directory.

    GNU gdb (GDB) 7.9.0.20150803-cvs

    Copyright (C) 2015 Free Software Foundation, Inc.

    License GPLv3+: GNU GPL version 3 or later <gnu.org/.../gpl.html>

    This is free software: you are free to change and redistribute it.

    There is NO WARRANTY, to the extent permitted by law. Type "show copying"

    and "show warranty" for details.

    This GDB was configured as "--host=i686-redhat-linux --target=msp430-elf". (1)

    Type "show configuration" for configuration details.

    For bug reporting instructions, please see:

    <www.gnu.org/.../>.

    Find the GDB manual and other documentation resources online at:

    <www.gnu.org/.../>.

    For help, type "help".

    Type "apropos word" to search for commands related to "word"...

    Reading symbols from msp430f2013.out...done.

    (gdb) target remote :55000

    Remote debugging using :55000

    Remote communication error. Target disconnected.: Connection reset by peer.

    I don't know if these notes help to identify the problem or not. I didn't understand the message, line marked (1):

    This GDB was configured as "--host=i686-redhat-linux --target=msp430-elf".

  • One of the error messages when I try to run the debugger (msp430-elf-gdb:

    Could not load the Python gdb module from `/opt/redhat/msp430-15r1-105/i686-redhat-linux/share/gdb/python'.

    seems to imply that I need Red Hat Linux, and that a particular Python library is required:

       ..../share/gdb/python'

    I am not running Red Hat Linux, so does that mean that I cannot use this version of gdb?

  • Hi Charles,

    I didn't try adding the python directory to GCC, because I'm unsure of how to do that. Is it a matter of my adding a library path to my environment? Or is there a command line entry when running GCC? Or is it a command line option when starting msp430-elf-gdb? Or was it something I should have done when I first ran the "msp430-gcc-full-linux-installer-4.0.1.0.run" installer?

    Thanks again for your help,
    Craig Ross
  • Hi Craig,

    I moved this to to compiler forum so they can look into it since it seems like its a problem with the compiler.

    Regards,
    Charles O.
  • Hi Charles,

    Thanks for your help.

    Craig Ross

  • Hi Craig,

    I have just installed the MSP430 tools on Ubuntu. I see exactly the same warnings re. Python etc, but then gdb works fine:

    (gdb) target remote :55000

    Remote debugging using :55000

    __crt0_start ()

       at /opt/redhat/msp430-15r1-105/sources/tools/libgloss/msp430/crt0.S:60

    60 /opt/redhat/msp430-15r1-105/sources/tools/libgloss/msp430/crt0.S: No such file or directory.

    (gdb) cont

    Continuing.

    ^C

    [Remote target] #1 stopped.

    0x0000c534 in main () at blink.c:41

    41 while(i != 0);

    (gdb) step

    40 do i--;

    (gdb)

    The first time I tried to connect, I got a timeout error because the agent started installing a firmware update on the board. (It seems the agent doesn't actually connect to the hardware until the client connects to the agent.) It took me a couple of goes to get the firmware installed (because I am running on a virtual machine) but after that (and disconnecting and reconnecting the hardware) gdb and the agent worked consistently.

    Do you get any messages from the terminal running the gdb agent when you run the "target remote" command in gdb?

  • Hi Jamie,

    Here is a copy of the output in the terminal window where the console agent was started:

    Started the console agent:

    cgr@Robotics-Dell /opt/ti/gcc $ gdb_agent_console msp430.dat

    Successfully configured 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

    cgr@Robotics-Dell /opt/ti/gcc $

    When the eZ430-2013 device is plugged in, it is recognized by the O/S as /dev/ttyUSB0.

  • Jamie,

    I tried another experiment. I installed the IAR Workbench Kickstart 3.40 from the CD that came with the eZ430-2013 USB development "stick" on a Windows 8.1 laptop. Following the instructions in SLAU176A (the user's guide) I loaded the Blink LED example, compiled and tried starting the debugger, using the "out-of-the-box" IAR Workbench IDE, and received an emulator Fatal Error message box, stating: "failed to initialize device Session Aborted".

    Does this error message mean that the eZ430-2013 USB stick has been compromised? Could some of the gdb and gdb-console-agent attempts when I was trying to get the tools working on my Linux computer have scrambled the code in the eZ430? If this is the case, is there a way to restore the eZ430 to normal operation, or am I mostly out of luck?

    Thanks,

    Craig Ross

  • Hi Craig,

    Good test. It does sound more like a hardware problem. I'm afraid I'm not really familiar with the hardware. This page might help identify the problem: processors.wiki.ti.com/.../EZ430-F2013

    Jamie

  • Hi Jamie,

    In a random "walkabout through Google" I stumbled on the web page that you referenced. I've started following the steps listed in the article, mostly trying to get Win 8.1 to recognize the eZ430-f2013. Thanks for your help.

    Craig Ross