goodwatch/firmware/Makefile

31 lines
697 B
Makefile
Raw Normal View History

2017-09-21 19:31:09 +00:00
#Standard Debian gcc-msp430 and msp430mcu packages.
CC = msp430-gcc -mmcu=cc430f6137 -Wall -I.
2017-09-21 19:31:09 +00:00
2017-09-23 16:36:20 +00:00
BSL = ../bin/cc430-bsl.py
modules=main.o lcd.o lcdtext.o rtc.o keypad.o apps.o sidebutton.o
apps= apps/clock.o apps/rpn.o apps/hex.o apps/stopwatch.o
all: goodwatch.hex
*.c: gittag.h
gittag.h:
echo "#define GITTAG" 0x`git describe --always` >gittag.h
goodwatch: $(modules) $(apps) *.h
$(CC) -o goodwatch $(modules) $(apps)
../bin/printsizes.py goodwatch || echo "Please install python-pyelftools."
goodwatch.hex: goodwatch
msp430-objcopy -O ihex goodwatch goodwatch.hex
2017-09-21 19:31:09 +00:00
clean:
rm -f *~ *.hex *.elf *.o goodwatch gittag.h
2017-09-21 19:31:09 +00:00
erase:
2017-09-23 16:36:20 +00:00
$(BSL) -e
flash: goodwatch.hex
$(BSL) -etf goodwatch.hex
2017-09-23 16:36:20 +00:00
2017-09-21 19:31:09 +00:00