This is an old revision of the document!
MSP DEBUG
MSP DEBUG is used to program and debug MSP430 devices on Linux.
Pre-built
Install mspdebug
apt-get install mspdebug
Test
rf2500
mspdebug rf2500 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. Trying to open interface 1 on 036 Initializing FET... FET protocol version is 30394216 Set Vcc: 3000 mV Configured for Spy-Bi-Wire Device ID: 0x2553 Code start address: 0xc000 Code size : 16384 byte = 16 kb RAM start address: 0x200 RAM end address: 0x3ff RAM size : 512 byte = 0 kb Device: MSP430G2553/G2403 Number of breakpoints: 2 fet: FET returned NAK warning: device does not support power profiling Chip ID data: 25 53 Available commands: = erase isearch power save_raw simio alias exit load prog set step break fill load_raw read setbreak sym cgraph gdb md regs setwatch verify delbreak help mw reset setwatch_r verify_raw dis hexout opt run setwatch_w Available options: color gdb_loop enable_bsl_access gdbc_xfer_size enable_locked_flash_access iradix fet_block_size quiet gdb_default_port Type "help <topic>" for more information. Use the "opt" command ("help opt") to set options. Press Ctrl+D to quit. (mspdebug)
Build
Install libmsp430.so
Fetch code and install libraries
cd /opt/src mkdir slac460y cd slac460y wget http://www.ti.com/lit/sw/slac460y/slac460y.zip unzip slac460y.zip apt-get install libboost-all-dev libhidapi-dev libusb-1.0-0-dev
Patch for Linux
wget https://dlbeer.co.nz/articles/slac460y/slac460y-linux.patch patch -p1 < slac460y-linux.patch
Fixes for modern boost
find -iname "*.cpp" -exec sed -i 's/(chrono/(std::chrono/g' {} \; find -iname "*.cpp" -exec sed -i 's/boost::asio::io_service/boost::asio::io_context/g' {} \; find -iname "*.h" -exec sed -i 's/boost::asio::io_service/boost::asio::io_context/g' {} \;
Build and install
make make install ldconfig
Install mspdebug
cd /opt/src git clone https://github.com/dlbeer/mspdebug.git cd mspdebug apt-get install libusb-dev libreadline-dev make make install
Test
rf2500
mspdebug rf2500 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.15.0.1 Copyright (C) 2013 TI, Inc. Trying to open interface 1 on 017 rf2500: warning: can't detach kernel driver: No data available Initializing FET... FET protocol version is 30394216 Set Vcc: 3000 mV Configured for Spy-Bi-Wire fet: FET returned error code 4 (Could not find device or device not supported) fet: command C_IDENT1 failed Using Olimex identification procedure Device ID: 0x2553 Code start address: 0xc000 Code size : 16384 byte = 16 kb RAM start address: 0x200 RAM end address: 0x3ff RAM size : 512 byte = 0 kb Device: MSP430G2xx3 Number of breakpoints: 2 fet: FET returned NAK warning: device does not support power profiling Chip ID data: ver_id: 5325 ver_sub_id: 0000 revision: 00 fab: 60 self: 0000 config: 00 fuses: 00 Device: MSP430G2xx3 Available commands: ! fill power setwatch_r = gdb prog setwatch_w alias help read simio blow_jtag_fuse hexout regs step break isearch reset sym cgraph load run verify delbreak load_raw save_raw verify_raw dis md set erase mw setbreak exit opt setwatch Available options: color gdb_loop enable_bsl_access gdbc_xfer_size enable_fuse_blow iradix enable_locked_flash_access lowercase_dis fet_block_size quiet gdb_default_port Type "help <topic>" for more information. Use the "opt" command ("help opt") to set options. Press Ctrl+D to quit. (mspdebug)
ezfet
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.15.0.1 Copyright (C) 2013 TI, Inc. Reset communications... Version: 3.12.0.0 Core version: 0x1d, HIL version: 0x0d, HW: 0xaaacaaac Reset firmware... Set VCC: 3000 mV Starting interface... Device count: 1 Fetching JTAG ID... ID: 99 00 Reset parameters... hal_proto_execute: fid 0x07: HAL exception: 0xffc9 hal_proto_execute: fid: 0x07: failed v3hil: can't set param 0x0d to 0x00000000 Check JTAG fuse... Sync JTAG... Identify (9x)... Read device ID bytes at 0x01a00... Read TLV... ver_id: 82a1 ver_sub_id: 0000 revision: 21 fab: 55 self: 5555 config: 10 fuses: 55 activation_key: 00000000 Configuring for MSP430FR5994... hal_proto_execute: fid 0x07: HAL exception: 0xffc9 hal_proto_execute: fid: 0x07: failed v3hil: can't set param 0x0d to 0x00000000 Device: MSP430FR5994 [FRAM] Available commands: ! fill power setwatch_r = gdb prog setwatch_w alias help read simio blow_jtag_fuse hexout regs step break isearch reset sym cgraph load run verify delbreak load_raw save_raw verify_raw dis md set erase mw setbreak exit opt setwatch Available options: color gdb_loop enable_bsl_access gdbc_xfer_size enable_fuse_blow iradix enable_locked_flash_access lowercase_dis fet_block_size quiet gdb_default_port Type "help <topic>" for more information. Use the "opt" command ("help opt") to set options. Press Ctrl+D to quit. (mspdebug)