MSP430 client now dumps intel hex images.
[goodfet] / firmware / apps / Makefile
1
2 PORT=/dev/ttyUSB0
3 BSL=tos-bsl --invert-reset --invert-test -c $(PORT) --speed=38400
4
5 #mcu=msp430x1611
6 mcu=msp430x1612
7
8 #ldscript is wonky
9 GCCINC=-T ../ldscripts/161x.x
10
11 CC=msp430-gcc -g -mmcu=$(mcu) -DGCC $(GCCINC) -I ../include
12
13 apps= monitor/monitor.c spi/spi.c i2c/i2c.c chipcon/chipcon.c jtag/jtag.c jtag/jtag430.c
14 libs= ../lib/msp430f1612.c ../lib/command.c
15 app=goodfet
16
17 all: $(app)
18
19 goodfet.hex: goodfet
20
21 run:
22         ../../client/goodfet.msp430
23
24 install: $(app)
25         $(BSL) -e -p $(app).hex 
26         $(BSL) -P $(app).hex -r
27 $(app): $(app).c $(libs) $(apps)
28 $(app).hex: $(app)
29         msp430-objcopy goodfet -O ihex goodfet.hex
30 m4s: $(app).hex
31         msp430-objdump -D -m msp430 $(app).hex | m4s init
32 erase:
33         $(BSL) -e 
34 clean:
35         rm -f $(app)