MSP430 Launch Pad meets MacOSX

というワケで、まずは繋いでデバッグできる環境を整える。

環境構築

MSP430 LaunchPad Mac OS X
 http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_Mac_OS_X


・mspgccをgitから持ってくる例が挙げられているけど、
 latestをbuildした方が楽かもしれない(私の場合は、そうした)。
 mspdebugは、gitで持ってきてbuildした。
 libusb、lubusb-compat、libelfは、portで入れた。


・その他、finkとかHomeBrewとかでも出来るみたいね。


・TUSB3410のデバイスドライバは、sourceからbuildした。

試運転

LaunchPadをUSBケーブルに繋いで、おもむろにmspdebugを実行。

$ mspdebug rf2500
MSPDebug version 0.19 - debugging tool for MSP430 MCUs
Copyright (C) 2009-2012 Daniel Beer
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 003-0451-f432-00-00
Initializing FET...
FET protocol version is 30394216
Configured for Spy-Bi-Wire
Set Vcc: 3000 mV
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
Code memory starts at 0xc000
Number of breakpoints: 2


Available commands:
= erase load read setwatch verify
alias exit locka regs setwatch_r
break gdb md reset setwatch_w
cgraph help mw run simio
delbreak hexout opt set step
dis isearch prog setbreak sym


Available options:
color gdb_loop iradix
fet_block_size gdbc_xfer_size quiet


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


(mspdebug) reset
(mspdebug) exit


なんとなく動いているっぽいね。