Tag Archives: debugger

Free and Open Source MSP430 Debugging

Debugging for the MSP430 has always been complicated. The old mspgcc project incorporated the gdbproxy software, which was partially closed source because of the proprietary deubgging interface.

mspdebug is an open source debugger that allows you to debug the msp430 using common interfaces including the FET430UIF (the standard FET interface), EZ430 and EZ430-RF2500.

Installation and use is a breeze. Simply clone the code using git:

git clone git://mspdebug.git.sourceforge.net/gitroot/mspdebug/mspdebug

Then build

sudo make install

sudo is required since mspdebug will want to install in /usr/local/bin.
Once mspdebug is installed, it’s ready for use. For example, lets assume you have a hex file that was compiled using mspgcc or another compiler called “text.hex” and you want to flash it to an EZ430-RF2500 device.

sudo mspdebug rf2500

sudo is again required unless you have permissions for the USB port used for the ez430-rf2500. mspdebug automatically detects an EZ430-RF2500 and connects to it.

The screen will show the following, preceded by a list of useful commands and other relevant information :

Type “help ” for more information.
Press Ctrl+D to quit.

As with GDB, you have complete control interactively and you can type commands by writing and pressing ENTER. We can erase the flash, load the hex file and let it run as follows:

(mspdebug) erase
(mspdebug) load test.hex
(mspdebug) restart
(mspdebug) run

Besides working as standalone programmer, there are many other features and mspdebug can operate with GDB similar to what OpenOCD does for ARM devices.
This is incredibly powerful and very easy compared to other alternatives and makes a strong argument for MSP430 programming in Linux.