Categories
  • Uncategorised 5
  • programming 4
  • msp430 2
  • random 10
  • catflap 5
  • raspberry pi 2
  • kits 3
  • photography 2
  • macosx 2
  • RC Flying 18
j2n blog
  • Posts
  • Catflap project
  • Links
  • Brushless X5C
  • DOS=HIGH,UMB
  • Categories
  • Installation of mspdebug

    Mspdebug is a great tool for programming and debugging MSP430 controllers.

    Installing of the MSP debug stack

    Mspdebug can use the TI MSP Debug Stack which provides a driver for some of the debug adapters like the MSP-FET430UIF. We are going to build this driver for use with mspdebug later.

    Pre-requisits

    Before we can start compiling our library we need to install some additional packages in Ubuntu:

    sudo apt-get install libboost-dev libboost-thread-dev libboost-filesystem-dev libudev-dev libusb-1.0-0-dev libusb-dev

    The above command should fetch a whole raft of libraries, enough to start compiling.

    Download the sources for the library. wget http://www.ti.com/lit/sw/slac460k/slac460k.zip

    unzip slak460k.zip

    cd MSPDebugStack

    The author of mspdebug has made a patch which symplifies our life compiling the library, download and apply the patch. wget http://mspdebug.sourceforge.net/misc/slac460h_unix.diff

    patch -p1 < slac460h_unix.diff

    All hunks should apply although with some warnings because the patch was really for an older version.

    make

    Grab a cup of tea...

    When compilatin finishes without errors you should have a file called libmsp430.so in your current directory. Install it with:

    sudo make install

    Instalation of mspdebug

    We will use the git repository with the bleeding edge code.

    git clone git://git.code.sf.net/p/mspdebug/code mspdebug

    cd mspdebug-git

    If you want to install from a released version instead, download the latest version from http://mspdebug.sourceforge.net/download.html and unpack it:

    tar xvfz mspdebug-<version>.tar.gz

    cd mspdebug-<version>

    Build it:

    make

    Install it:

    sudo make install

    Time to test if it all works:

    mspdebug tilib

    It should output something like:

    `MSPDebug version 0.22 - debugging tool for MSP430 MCUs
    Copyright (C) 2009-2013 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.3.1.4 Copyright (C) 2013 TI, Inc.

    MSP430GetNumberOfUsbIfs
    MSP430
    GetNameOfUsbIf
    Found FET: ttyACM0
    MSP430_Initialize: ttyACM0
    FET firmware update is required.
    Re-run with --allow-fw-update to perform a firmware update.
    tilib: device initialization failed `

    Important to note is the line Chip info database from MSP430.dll... which indicates that it found our freshly built libmsp430.so. The example above indicated the firmware on the MSP-FETU430IF is outdated so let's correct that.

    mspdebug tilib --allow-fw-update

    This command will take a while and you should among others see something like this:

    ... FET firmware update is required. Starting firmware update (this may take some time)... Initializing bootloader... Erasing firmware... Programming new firmware... Done, finishing... Initializing bootloader... Erasing firmware... Programming new firmware... 0 percent done 25 percent done 50 percent done 75 percent done 100 percent done Done, finishing... Update complete ...

    Now connect the FET to your board and run mspdebug tilib. If it detects your mcu correctly it will dump you into an interactive shell where you can program and debug your software.

    Posted 8 years ago by Administrator.
  • Installation of gcc 4.9.1 for the MSP430

© 2023 j2n blog. All rights reserved.
  • RSS
  • Admin area
  • Home