GoodFET30 now MSP430F2254 compatible by default.
[goodfet] / firmware / Makefile
1
2 #include `uname`.mak
3 GOODFET?=/dev/ttyUSB0
4
5
6 #For tos-bsl, use --invert-reset --invert-test
7 BSL=goodfet.bsl -c $(GOODFET) --speed=38400
8
9 #mcu=msp430x2274
10 #mcu=msp430x2618
11 mcu?=msp430x1612
12
13
14 #N.B., gcc WILL NOT BITCH if this file doesn't exist.
15 #GCCINC=-T ldscripts/161x.x
16 GCCINC=-T ldscripts/$(mcu).x
17
18 CCEXTRA?=
19 CC=msp430-gcc -Wall -Os -g -mmcu=$(mcu) -D$(mcu) -DGCC $(GCCINC) -I include $(CCEXTRA)
20
21 #Define extra modules here.
22 moreapps?=apps/i2c/i2c.o apps/chipcon/chipcon.o
23
24 apps= $(moreapps) apps/monitor/monitor.o apps/spi/spi.o   apps/jtag/jtag.o apps/jtag/jtag430.o apps/jtag/jtag430x2.o apps/avr/avr.o
25 libs= lib/$(mcu).o lib/command.o apps/jtag/jtag430asm.o
26 app= goodfet
27
28 all: $(app).hex
29
30 goodfet.hex: goodfet
31
32 run:
33         ../client/goodfet.msp430 test
34
35 install: $(app).hex
36         #$(BSL) -e
37         #ls info.txt && $(BSL) -p info.txt || true  #MSP430F2xx targets only, inelegant.
38         $(BSL) -e -p $(app).hex 
39 verify:
40         $(BSL) -P $(app).hex -v $(app).hex
41 dumpinfo:
42         $(BSL) --dumpinfo
43 $(app): $(app).c $(libs) $(apps)
44 $(app).hex: $(app)
45         msp430-objcopy goodfet -O ihex goodfet.hex
46 m4s: $(app).hex
47         msp430-objdump -D -m msp430 $(app).hex | m4s init
48 erase:
49         $(BSL) -e 
50 clean:
51         rm -f $(app) $(app).hex $(libs) $(apps)
52 docs:
53         doxygen
54 pushdocs: docs
55         rsync --exclude .svn -ave ssh doc/html/* travisutk,goodfet@web.sourceforge.net:htdocs/docs/
56 .FAKE: docs