I recently found a forked project MSPGCC4. It is built against newer GCC and GDB. It supports multiple versions. I tried GCC 4.4.3 and GDB 7.0.1. The compilation and installation is very easy. Just run the buildgcc.sh, choose wanted versions and watch the progress.
Compilation of source code for MSP430 is the same like in the previous article. Lets focus on debugging. I had troubles to make it working with the original MSPGCC project. In other words I didn’t make it working. But GDB 7.0.1 works better.
Mspdebug supports breakpoints only from newest versions, use git to get it (git clone git://mspdebug.git.sourceforge.net/gitroot/mspdebug). It currently supports only 1 breakpoint at a time.
First run the mspdebug in a stub mode:
$ mspdebug -R gdb MSPDebug version 0.7 - debugging tool for MSP430 MCUs Copyright (C) 2009, 2010 Daniel Beer <daniel@tortek.co.nz> 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 002 rf2500: warning: can't detach kernel driver: No data available FET protocol version is 30000002 Configured for Spy-Bi-Wire Set Vcc: 3000 mV Device: MSP430F22xx Sending magic messages for >= 30000000 Bound to port 2000. Now waiting for connection...
Then run debugger. I like DDD:
$ ddd --debugger msp430-gdb test.elf
In the debugger console run a command to connect to the stub:
(gdb) target remote :2000 0x0000e000 in _reset_vector__ ()
Now you can debug at will.
No Comments
No comments yet.
RSS feed for comments on this post.
Sorry, the comment form is closed at this time.