Statistics
| Branch: | Tag: | Revision:

mongoose / examples / CC3200 / Makefile @ eaef5bd1

History | View | Annotate | Download (709 Bytes)

1
SDK ?= $(shell cat sdk.version)
2
SRC_DIR ?= $(realpath ../../..)
3
PORT ?= auto
4

    
5
.PHONY: all clean
6

    
7
MAKEFLAGS += w
8

    
9
all clean:
10
	docker run --rm -i -v $(SRC_DIR):/src $(SDK) \
11
		/bin/bash -c "\
12
			make -C /src/mongoose mongoose.c mongoose.h && \
13
			make -C /src/mongoose/examples/CC3200 -f Makefile.build $@ -$(MAKEFLAGS) \
14
		"
15

    
16
ifeq ("$(PORT)", "auto")
17
PORT = $(shell ls -1 /dev/ttyUSB* | tail -n 1)
18
endif
19
flash:
20
	docker run --rm -it --privileged -v $(SRC_DIR):/src $(SDK) /bin/bash -c "\
21
		cd /usr/local/bin; \
22
		./cc3200prog $(PORT) /src/fw/platforms/cc3200/firmware/fw.bin \
23
	"
24

    
25
debug:
26
	docker run --rm -it --privileged -v $(SRC_DIR):/src $(SDK) \
27
		/bin/bash -c "cd /src/fw/platforms/cc3200 && tools/gdb.sh"