1 #
2 # ======== ZumoCC3200 Makefile ========
3 # This makfile builds README.html from README.md and optionally builds and
4 # uploads selected Energia sketches to the ZumoCC3200.
5 #
7 all: README.html
9 %.html:%.md
10 rm -f $@
11 etc/md2html.ksh $< > $@
12 clean:
13 rm -f README.html
14 rm -rf build
16 # ======== Sketch Build and Upload Rules ========
17 #
18 # To Build Sketches
19 # Windows
20 # Start a git bash shell, cd to the folder containing this makefile, and
21 # enter the following commands
22 # export ENERGIA=c:/ti/energia-0101E0017
23 # $ENERGIA/tools/common/bin/make test
24 #
25 # Linux/Mac
26 # Start a command shell, cd to the folder containing this makefile, and
27 # enter the following commands
28 # export ENERGIA=...
29 # make test
30 #
31 # To Build and Upload ZumoTest
32 # Windows
33 # export ENERGIA=c:/ti/energia-0101E0017
34 # export SERPORT=9
35 # $ENERGIA/tools/common/bin/make upload
36 #
37 # Linux/Mac
38 # export ENERGIA=...
39 # export SERPORT=...
40 # make upload
41 #
43 # ENERGIA - the installation directory of Energia. This is only used when
44 # building sketches from the command line
45 # SPORT - the serial port id used by the flash programmer to upload
46 # binaries to the ZumoCC3200
47 #
48 ENERGIA ?= c:/ti/energia-0101E0017
49 SERPORT ?= 9
51 INO2CPP = $(CURDIR)/etc/ino2cpp
52 BUILD = $(INO2CPP)/ebuild.sh -t cc3200emt:RedBearLab_CC3200 -e $(ENERGIA)
53 FLASH = $(CURDIR)/etc/rbload.sh
55 test: ./build/ZumoTest/ZumoTest.cpp.bin ./build/ManualDrive/ManualDrive.cpp.bin
57 # a self-contained sketch (on need for ZumoCC3200 library)
58 ./build/ZumoTest/ZumoTest.cpp.bin: $(wildcard src/Energia/ZumoTest/*)
59 @echo build system test ...
60 $(BUILD) ./src/Energia/ZumoTest ./build/ZumoTest
62 # a simple sketch that requires the ZumoCC3200 library
63 ./build/ManualDrive/ManualDrive.cpp.bin: $(wildcard ./src/Energia/libraries/ZumoCC3200/examples/ManualDrive/*)
64 @echo build a library example ...
65 $(BUILD) ./src/Energia/libraries/ZumoCC3200/examples/ManualDrive ./build/ManualDrive -Dsketchbook.path=$(CURDIR)/src/Energia
67 # upload ZumoTest to the ZumoCC3200
68 upload: ./build/ZumoTest/ZumoTest.cpp.bin
69 @echo flashing $(<F) via serial port $(SERPORT) ...
70 $(FLASH) $< $(SERPORT) $(ENERGIA)