7228f2c1da78cd34908b02be49cd9969021cc27f
[goodfet] / firmware / apps / Makefile
1
2 PORT=/dev/ttyUSB0
3 BSL=tos-bsl --invert-reset --invert-test -c $(PORT)
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
14 libs= ../lib/msp430f1612.c ../lib/command.c
15 app=goodfet
16
17 all: $(app)
18
19 goodfet.hex: goodfet
20
21
22 install: $(app)
23         $(BSL) -e -p $(app) 
24         $(BSL) -P $(app) -r
25 $(app): $(app).c $(libs) $(apps)
26 $(app).hex: $(app)
27         msp430-objcopy goodfet -O ihex goodfet.hex
28 m4s: $(app).hex
29         msp430-objdump -D -m msp430 $(app).hex | m4s init
30 erase:
31         $(BSL) -e 
32 clean:
33         rm -f $(app)