Here's a short how-to on how to use the GNU Debugger (GDB) alongside the MSP430 development tools on OS X (Note that these steps will also work on Un*x).
Up until now I've been using mspdebug for everything, and I think it's time to wield the power of gdb.
Start mspdebug like this:
$ mspdebug rf2500 gdb
In another window, start GDB and connect to mspdebug on port 2000.
GNU gdb (GDB) 7.0.1
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
(gdb) target remote localhost:2000
(gdb) file test.elf
(gdb) load test.elf
Loading section .text, size 0x4e lma 0xf800
Loading section .vectors, size 0x20 lma 0xffe0
Start address 0xf800, load size 110
Transfer rate: 728 bytes/sec, 55 bytes/write.
Here are some commands of interest:
- info registers
- info breakpoints
- break <function-name>
- continue / cont
- q (quit)
Full GDB manual here: http://sourceware.org/gdb/current/onlinedocs/gdb/
Examples will follow in later articles, but for now we've simply shown the few steps required to get started with GDB. Have fun!