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-EXP430FR4133: libmsp430.so

Part Number: MSP-EXP430FR4133
Other Parts Discussed in Thread: MSP430FR4133, ENERGIA
Hello. I am novice in microcontrollers. I have MSP430FR4133 LaunchPad Development Kit

I use this lessons www.simplyembedded.org/.../ for learning.

Program for msp430fr4133 compiled succefully. Next step according to the tutorial is flash *.hex
file with mspdebug. Mspdebug from debian repository v0.22 without a driver (ezfet) for my msp430fr4133.
So I build mspdebug v0.25 from source. When I launch


# ./mspdebug ezfet
MSPDebug version 0.25 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chip info database from MSP430.dll v3.13.0.601 Copyright (C) 2013 TI, Inc.
Reset communications...
Version: 2.4.1.901, HW: 0xaaaaaaaa
Reset firmware...
hal_proto_execute: HAL exception: 0xffff
hal_proto_execute: fid: 0x51
And red led101 fired on board.

Searching for HAL exception (github.com/.../43) show a solution - use
tilib driver. --> Need to build libmsp430.so from source. Correspond to libmsp430 readme file I built it with libboost_v.1.56.
According to information about tilib driver in mspdebug man page


root@msp430:/home/user/msp430/mspdebug/mspdebug-master# whereis libmsp430.so
libmsp430: /usr/local/bin/libmsp430.so /usr/local/lib/libmsp430.so
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# export MSPDEBUG_TILIB_PATH=/usr/local/bin
root@msp430:/home/user# ldconfig

When I launch

# ./mspdebug tilib
MSPDebug version 0.25 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chip info database from MSP430.dll v3.13.0.601 Copyright (C) 2013 TI, Inc.
tilib_api: can't find libmsp430.so: libboost_filesystem.so.1.56.0: cannot open shared object file: No such file or directory

root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ln -s /usr/local/bin/libboost_filesystem.so.1.56.0 /lib/libboost_filesystem.so.1.56.0
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ln -s /usr/local/bin/libboost_system.so.1.56.0 /lib/libboost_system.so.1.56.0
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ldconfig
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ./mspdebug tilib
MSPDebug version 0.25 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com>
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Chip info database from MSP430.dll v3.13.0.601 Copyright (C) 2013 TI, Inc.
tilib_api: can't find libmsp430.so: libboost_date_time.so.1.56.0: cannot open shared object file: No such file or directory

root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ldd /usr/local/bin/libmsp430.so     
linux-vdso.so.1 (0x00007ffe7cbef000)
    libhidapi-libusb.so.0 => /lib/x86_64-linux-gnu/libhidapi-libusb.so.0 (0x00007f905a62b000)     
    libboost_filesystem.so.1.56.0 => /lib/libboost_filesystem.so.1.56.0 (0x00007f905a610000)     
    libboost_date_time.so.1.56.0 => not found     
    libboost_chrono.so.1.56.0 => not found     
    libboost_thread.so.1.56.0 => not found     

    libusb-1.0.so.0 => /usr/local/lib/libusb-1.0.so.0 (0x00007f905a5f5000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f905a5e9000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f905a5c8000)     

    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f905a444000)     

    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f905a2c1000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f905a2a7000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f905a0e6000) /lib64/ld-    linux-x86-64.so.2 (0x00007f905a9d1000)     

    libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007f905a0be000)

root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ./mspdebug tilib
MSPDebug version 0.25 - debugging tool for MSP430 MCUs Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com> This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Chip info database from MSP430.dll v3.13.0.601 Copyright (C) 2013 TI, Inc. tilib_api: can't find libmsp430.so: libboost_date_time.so.1.56.0: cannot open shared object file: No such file or directory
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# mv /usr/local/bin/libboost_date_time.so.1.56.0 /lib/
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ldconfig
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ./mspdebug tilib
MSPDebug version 0.25 - debugging tool for MSP430 MCUs Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com> This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Chip info database from MSP430.dll v3.13.0.601 Copyright (C) 2013 TI, Inc.
tilib_api: can't find libmsp430.so: libboost_chrono.so.1.56.0: cannot open shared object file: No such file or directory
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# cp /home/user/msp430/boost_1_56_0/stage/lib/libboost_chrono.so.1.56.0 /lib/
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ./mspdebug tilib
MSPDebug version 0.25 - debugging tool for MSP430 MCUs Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com> This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Chip info database from MSP430.dll v3.13.0.601 Copyright (C) 2013 TI, Inc. tilib_api: can't find libmsp430.so: libboost_thread.so.1.56.0: cannot open shared object file: No such file or directory
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# find /home/user/msp430/boost_1_56_0/ -iname "libboost_thread.so*"
/home/user/msp430/boost_1_56_0/bin.v2/libs/thread/build/gcc-8/release/threading-multi/libboost_thread.so.1.56.0
/home/user/msp430/boost_1_56_0/stage/lib/libboost_thread.so /home/user/msp430/boost_1_56_0/stage/lib/libboost_thread.so.1.56.0 root@msp430:/home/user/msp430/mspdebug/mspdebug-master# cp /home/user/msp430/boost_1_56_0/stage/lib/libboost_thread.so.1.56.0 /lib/
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ldconfig
root@msp430:/home/user/msp430/mspdebug/mspdebug-master# ./mspdebug tilib
MSPDebug version 0.25 - debugging tool for MSP430 MCUs Copyright (C) 2009-2017 Daniel Beer <dlbeer@gmail.com> This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Chip info database from MSP430.dll v3.13.0.601 Copyright (C) 2013 TI, Inc. tilib_api: can't find libmsp430.so: /lib/libboost_filesystem.so.1.56.0: undefined symbol: _ZN5boost6system15system_categoryEv



--------------------------------------------
# uname -a
Linux msp430 4.19.0-5-amd64 #1 SMP Debian 4.19.37-5+deb10u1 (2019-07-19) x86_64 GNU/Linux

# udevadm info /dev/ttyACM0
P: /devices/pci0000:00/0000:00:06.0/usb2/2-2/2-2:1.0/tty/ttyACM0
N: ttyACM0
L: 0
S: serial/by-id/usb-Texas_Instruments_MSP_Tools_Driver_0EAEB46F09000500-if00
S: serial/by-path/pci-0000:00:06.0-usb-0:2:1.0
E: DEVPATH=/devices/pci0000:00/0000:00:06.0/usb2/2-2/2-2:1.0/tty/ttyACM0
E: DEVNAME=/dev/ttyACM0
E: MAJOR=166
E: MINOR=0
E: SUBSYSTEM=tty
E: USEC_INITIALIZED=21161867622
E: ID_BUS=usb
E: ID_VENDOR_ID=2047
E: ID_MODEL_ID=0013
E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
E: ID_PCI_SUBCLASS_FROM_DATABASE=USB controller
E: ID_PCI_INTERFACE_FROM_DATABASE=OHCI
E: ID_VENDOR_FROM_DATABASE=Texas Instruments
E: ID_MODEL_FROM_DATABASE=KeyLargo/Intrepid USB
E: ID_VENDOR=Texas_Instruments
E: ID_VENDOR_ENC=Texas\x20Instruments
E: ID_MODEL=MSP_Tools_Driver
E: ID_MODEL_ENC=MSP\x20Tools\x20Driver
E: ID_REVISION=0200
E: ID_SERIAL=Texas_Instruments_MSP_Tools_Driver_0EAEB46F09000500
E: ID_SERIAL_SHORT=0EAEB46F09000500
E: ID_TYPE=generic
E: ID_USB_INTERFACES=:020201:0a0000:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=cdc_acm
E: ID_USB_CLASS_FROM_DATABASE=Miscellaneous Device
E: ID_USB_PROTOCOL_FROM_DATABASE=Interface Association
E: ID_PATH=pci-0000:00:06.0-usb-0:2:1.0
E: ID_PATH_TAG=pci-0000_00_06_0-usb-0_2_1_0
E: ID_MM_CANDIDATE=1
E: DEVLINKS=/dev/serial/by-id/usb-Texas_Instruments_MSP_Tools_Driver_0EAEB46F09000500-if00 /dev/serial/by-path/pci-0000:00:06.0-usb-0:2:1.0
E: TAGS=:systemd:

# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 006: ID 2047:0013 Texas Instruments
Bus 002 Device 005: ID 80ee:0021 VirtualBox USB Tablet
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

# apt install patch ncurses-dev build-essential bison flex libgmp3-dev libmpfr-dev libmpc-dev texinfo zlib1g-dev libusb-dev libreadline6-dev libz-dev <--this packets installed.

  • Hi 

    You are use the Linux system right ?

    You can can the CCS for Linux to make the debug operations simple.For more information you can refer to http://software-dl.ti.com/ccs/esd/documents/ccsv8_linux_host_support.html

    Best regards

    Gary

  • 1. Your answer is not answer on my question because libmsp430.so with libboost_v.1.56 still give error and

    2. I have some troubles with CCS v9 too.

    I sent the error above to mspgcc mailing list. And they say that last error "tilib_api: can't find libmsp430.so: /lib/libboost_filesystem.so.1.56.0: undefined symbol: _ZN5boost6system15system_categoryEv" is libmsp430.so error, not a mspdebug error. And libmsp430.so is TI product so error need to be redirected here.

    A program (led blink code) compiled successfully in CCS v9 (under the linux machine above). But when I try to flash it some amazing things are happen (need to be mentioned that I accept firmware upgrade for my board which studio suggested). After button "flash firmware" pressed operation completed successfully. But I have no blinking led on board. This occasion forced me to try energia (). When I flash standard led blink code from energia examples it works good. (So the board is in good repair.) After turning-off program continue. If I flash my program after standard led blink code my code works fine. And led blink. After turning-off my program lost. No led blink.

    So now I have

    - tilib driver from mspdebug does not work;

    - ezfet driver from mspdebug throw "HAL exception";

    - CCSv9 flash but no led blink;

    - energia flash but program lost after turning-off.

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

    My code.

    #include <msp430fr4133.h>


    /**
     * main.c
     */
    int main(void)
    {
        /* Recommend initializing all unused ports to eliminate wasted current consumption on unused pins. */
    /*  P1DIR = 0xFF;
        P1OUT = 0x00; */
        P2DIR = 0xFF;
        P2OUT = 0x00;
        P3DIR = 0xFF;
        P3OUT = 0x00;
        P4DIR = 0xFF;
        P4OUT = 0x00;
        P5DIR = 0xFF;
        P5OUT = 0x00;
        P6DIR = 0xFF;
        P6OUT = 0x00;
        P7DIR = 0xFF;
        P7OUT = 0x00;
        P8DIR = 0xFF;
        P8OUT = 0x00;

        WDTCTL = WDTPW + WDTHOLD;    // stop watchdog timer

        /* Set P1.0 direction to output */
        P1DIR |= 0x01;

        /* Set P1.0 output high */
        P1OUT |= 0x01;

        while( 1 ){
            /* wait for 200000 cycles */
            __delay_cycles( 200000 );
            /* toggle P1.0 output */
            P1OUT ^= 0x01;
        }

        
        return 0;
    }

  • Hi 

    Can you go into the debug mode with ccs9 to see where the code stoped?

    Best regards

    Gary

  • Yes, I can. Run->Debug. Then debugger stop on "P2DIR = 0xFF;" which line number is 12. On each step red led101 blink. In the while loop led1 (P1.0) must blink. But it does not.

    What about libmsp430.so errors?

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

    Code Composer Studio   Version: 9.1.0.00010

    Energia Version: 1.8.7E21

  • Hi 

    I know what's wrong with your problem. 

    You have miss the " PM5CTL0 &= ~LOCKLPM5;  " after you configure the GPIO

    Add it after     P1OUT |= 0x01

    Best regards

    Gary

  • Thank you. But without all this code:

    /* Recommend initializing

    ...
        P8OUT = 0x00;

    */

    led1 (P1.0) still does not work.

  • 1. I copy code from  http://dev.ti.com/tirex/explore/node?node=AFd2c4zLgK2Xw5-saII5cA__IOGqZri__LATEST . The board work good when I flash and when I debug. So I can continue to work.  What was the cause of it`s incorrect work? Why I need to add this string " PM5CTL0 &= ~LOCKLPM5;"?

    2. What about libmsp430.so? Anybody collide with error above?

  • #1 please refer to  the chapter 8.3.1 in the user's guide http://www.ti.com/lit/ug/slau445i/slau445i.pdf

**Attention** This is a public forum