2017-09-21 19:31:09 +00:00
|
|
|
|
2017-09-23 15:20:55 +00:00
|
|
|
#Standard Debian gcc-msp430 and msp430mcu packages.
|
2017-11-14 16:21:28 +00:00
|
|
|
CC = msp430-gcc -mmcu=cc430f6137 -Wall -I. -Os
|
2017-09-21 19:31:09 +00:00
|
|
|
|
2017-09-23 16:36:20 +00:00
|
|
|
BSL = ../bin/cc430-bsl.py
|
|
|
|
|
2017-11-28 17:54:21 +00:00
|
|
|
modules=rtcasm.o main.o lcd.o lcdtext.o rtc.o keypad.o apps.o sidebutton.o radio.o power.o \
|
2017-11-18 17:36:15 +00:00
|
|
|
dmesg.o \
|
2017-11-16 17:53:12 +00:00
|
|
|
libs/assembler.o
|
2017-11-19 19:14:44 +00:00
|
|
|
apps= apps/clock.o apps/rpn.o apps/hex.o apps/stopwatch.o apps/morse.c
|
2017-09-23 15:20:55 +00:00
|
|
|
|
2017-09-23 16:21:58 +00:00
|
|
|
all: goodwatch.hex
|
2017-09-23 15:20:55 +00:00
|
|
|
|
2017-10-02 23:22:29 +00:00
|
|
|
*.c: gittag.h
|
|
|
|
|
|
|
|
gittag.h:
|
|
|
|
echo "#define GITTAG" 0x`git describe --always` >gittag.h
|
|
|
|
goodwatch: $(modules) $(apps) *.h
|
2017-11-18 19:29:50 +00:00
|
|
|
$(CC) -T msp430.x -o goodwatch $(modules) $(apps)
|
2017-10-06 22:11:50 +00:00
|
|
|
../bin/printsizes.py goodwatch || echo "Please install python-pyelftools."
|
|
|
|
|
2017-09-23 15:20:55 +00:00
|
|
|
goodwatch.hex: goodwatch
|
2017-09-26 13:15:55 +00:00
|
|
|
msp430-objcopy -O ihex goodwatch goodwatch.hex
|
2017-09-21 19:31:09 +00:00
|
|
|
|
|
|
|
clean:
|
2017-11-14 21:05:14 +00:00
|
|
|
rm -rf *~ */*~ *.hex *.elf *.o */*.o goodwatch gittag.h html latex
|
2017-09-21 19:31:09 +00:00
|
|
|
erase:
|
2017-09-23 16:36:20 +00:00
|
|
|
$(BSL) -e
|
2017-09-24 15:48:52 +00:00
|
|
|
flash: goodwatch.hex
|
2017-09-24 22:52:30 +00:00
|
|
|
$(BSL) -etf goodwatch.hex
|
2017-11-18 19:56:46 +00:00
|
|
|
dmesg:
|
|
|
|
../bin/cc430-bsl.py -P goodwatch.hex -uD
|
2017-09-23 16:36:20 +00:00
|
|
|
|
2017-11-19 04:05:18 +00:00
|
|
|
#Same as dmesg, but it gives the target some time to boot first.
|
|
|
|
run:
|
|
|
|
sleep 5
|
|
|
|
../bin/cc430-bsl.py -P goodwatch.hex -uD
|