summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-06-20 19:14:56 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-06-20 19:14:56 (GMT)
commit64afca127612d6d9ded4ac86a7e76fbe3d8086f1 (patch)
tree7972b905998cbe27510de3013068f999f13880df /Makefile
parenta02bd3bc5dcd3b1c97b93f36d4129c1cc68ea7f7 (diff)
Makefile: Fix make sim (allow BOARD to be unset)
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 7db1c6d..729f13d 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,13 @@ export PYTHONPATH := $(PWD)/tools/nrfutil:$(PWD)/tools/intelhex:$(PYTHONPATH)
all : bootloader reloader micropython
+ifdef BOARD
+WASP_WATCH_PY = wasp/boards/$(BOARD)/watch.py
+$(WASP_WATCH_PY) : $(WASP_WATCH_PY).in
+ (cd wasp; ../tools/preprocess.py $(WASP_WATCH_PY).in $(WASP_WATCH_PY))
+else
BOARD ?= $(error Please set BOARD=)
+endif
clean :
$(RM) -r \
@@ -31,7 +37,7 @@ reloader: bootloader
softdevice:
micropython/ports/nrf/drivers/bluetooth/download_ble_stack.sh
-micropython: wasp/boards/$(BOARD)/watch.py
+micropython: $(WASP_WATCH_PY)
$(MAKE) -C micropython/mpy-cross
$(RM) micropython/ports/nrf/build-$(BOARD)-s132/frozen_content.c
$(MAKE) -C micropython/ports/nrf \
@@ -44,10 +50,6 @@ micropython: wasp/boards/$(BOARD)/watch.py
--application micropython/ports/nrf/build-$(BOARD)-s132/firmware.hex \
micropython.zip
-wasp/boards/$(BOARD)/watch.py : wasp/boards/$(BOARD)/watch.py.in
- (cd wasp; ../tools/preprocess.py boards/$(BOARD)/watch.py.in > \
- boards/$(BOARD)/watch.py)
-
dfu:
python3 -m nordicsemi dfu serial --package micropython.zip --port /dev/ttyACM0