Makefile: Fix make sim (allow BOARD to be unset)
Signed-off-by: Daniel Thompson <daniel@redfelineninja.org.uk>
This commit is contained in:
parent
a02bd3bc5d
commit
64afca1276
1 changed files with 7 additions and 5 deletions
12
Makefile
12
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue