MSP430 launchpad
Compiling and flashing
You need to have a recent version of mspgcc. Debian testing has it in the repository, Fedora should have it soon, installation from source is not that painful.
$ msp430-gcc -Os -Wall -g -mmcu=msp430g2553 -o image.elf source1.c source2.c
$ mspdebug rf2500 "prog image.elf"
Simple Makefile
TARGET=clk
MCU=msp430g2553
CC=msp430-gcc
CFLAGS=-Os -Wall -Wno-main -g -mmcu=$(MCU)
all: $(TARGET).elf
%.elf: %.c
$(CC) $(CFLAGS) -o $@ $<
flash: $(TARGET).elf
mspdebug rf2500 "prog $(TARGET).elf"
clean:
rm -fr *.o *.elf
Debugging with GDB
The remarkable mspdebug contains basic (yet still very useful) debugger, however if you want to have a full source-level debugger, you can use (mspgcc-supplied version of) gdb via mspdebug's gdb stub.
$ mspdebug rf2500 gdb &
$ msp430-gdb image.elf
(gdb) target remote :2000
Tutorial links
- http://www.egarante.net/search/label/msp430
- http://www.43oh.com/category/tutorials-2/
- http://mspsci.blogspot.sk/
- http://processors.wiki.ti.com/index.php/Getting_Started_with_the_MSP430_LaunchPad_Workshop
TI docs
- LaunchPad Experimenter Board User's Guide [alt]
- MSP430x2xx Family User's Guide (Rev. I)
- MSP430G2x53, MSP430G2x13 Mixed Signal Microcontroller (Rev. F) [alt]
- MSP430G2x52, MSP430G2x12 Mixed Signal Microcontroller (Rev. E) [alt]