Sunday 11 October 2015

mspdebug

When it comes to debugging programs, the first tool in my toolbox for compiled languages like C or C++ is usually 'print'. I don't tend to bust out a debugger unless I'm in an IDE such as IntelliJ.

This can pose problems for me in a relatively print-challenged environment, such as msp430 on Linux. Last night I had found myself in just this situation when I found myself musing on why the msp430 upload tool was called mspdebug. A quick search found a nice manual and a few minutes later I was debugging away.

Here's a sample transcript:

With the sketch already uploaded to the board, this script shows how to:

  • Generate a name-list from the sketch's Elf file
  • Import these symbols into the debugger
  • Set a breakpoint by name in the program
  • Run the sketch up to the breakpoint
  • Single-step the program once the breakpoint has been reached.
If you're interested, the sketch is a rather convoluted version of Blink.

No comments:

Post a Comment