X-Git-Url: http://git.rot13.org/?p=goodfet;a=blobdiff_plain;f=firmware%2FMakefile;h=75ada153f0604c921ffa474d1897c85c51ce2c81;hp=b17708b6828a04a25abb1eb6f8a1aa1b7e6cef4b;hb=7f43ff80b47ffc85c8078d962011024979ee6e20;hpb=3bf98a899ca8003835b69d949d299369a5d7a4f7 diff --git a/firmware/Makefile b/firmware/Makefile index b17708b..75ada15 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -1,17 +1,19 @@ PORT=/dev/ttyUSB0 -BSL=msp430-bsl --invert-reset --invert-test -c $(PORT) --speed=38400 +BSL=../../contrib/tos-bsl --invert-reset --invert-test -c $(PORT) --speed=38400 -#mcu=msp430x1611 +#mcu=msp430x2618 mcu=msp430x1612 -#ldscript is wonky -GCCINC=-T ldscripts/161x.x + +#N.B., gcc WILL NOT BITCH if this file doesn't exist. +#GCCINC=-T ldscripts/161x.x +GCCINC=-T ldscripts/$(mcu).x CC=msp430-gcc -Wall -g -mmcu=$(mcu) -DGCC $(GCCINC) -I include apps= apps/monitor/monitor.o apps/spi/spi.o apps/i2c/i2c.o apps/chipcon/chipcon.o apps/jtag/jtag.o apps/jtag/jtag430.o -libs= lib/msp430f1612.o lib/command.o apps/jtag/jtag430asm.o +libs= lib/$(mcu).o lib/command.o apps/jtag/jtag430asm.o app=goodfet all: $(app).hex @@ -22,8 +24,13 @@ run: ../client/goodfet.msp430 test install: $(app).hex - $(BSL) -e -p $(app).hex - #$(BSL) -P $(app).hex -r + $(BSL) -e + #$(BSL) -p info.txt || true #MSP430F2xx targets only, inelegant. + $(BSL) -p $(app).hex +verify: + $(BSL) -P $(app).hex -v $(app).hex +dumpinfo: + $(BSL) --dumpinfo -c /dev/ttyUSB0 $(app): $(app).c $(libs) $(apps) $(app).hex: $(app) msp430-objcopy goodfet -O ihex goodfet.hex