summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Thompson <daniel@redfelineninja.org.uk>2020-01-20 08:05:31 (GMT)
committerDaniel Thompson <daniel@redfelineninja.org.uk>2020-01-20 08:09:28 (GMT)
commit6e9cff06d559633c40eb2ae95a80e4250ff91c38 (patch)
tree6c27a2b5314a12f9d72a56d3dc2131359fdb695d /Makefile
parent2a7d89219109c7076b5a9c6c821cb0e3bd039b6d (diff)
Makefile: Get user to supply BOARD= and job count
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile18
1 files changed, 9 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 8d57c1e..e472cf8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,31 +1,31 @@
export PYTHONPATH := $(PWD)/tools/nrfutil:$(PWD)/tools/intelhex:$(PYTHONPATH)
-JOBS = -j $(shell nproc)
-
all : bootloader micropython
+BOARD=$(error Please set BOARD=)
+
clean :
rm -rf \
- bootloader/_build-nitrogen_nrf52832 \
+ bootloader/_build-$(BOARD)_nrf52832 \
micropython/mpy-cross/build \
- micropython/ports/nrf/build-dsd6-s132
+ micropython/ports/nrf/build-$(BOARD)-s132
submodules :
git submodule update --init --recursive
bootloader:
- make -C bootloader/ BOARD=nitrogen_nrf52832 $(JOBS) all genhex
+ $(MAKE) -C bootloader/ BOARD=$(BOARD)_nrf52832 all genhex
python3 tools/hexmerge.py \
+ bootloader/_build-$(BOARD)_nrf52832/$(BOARD)_nrf52832_bootloader-*-nosd.hex \
bootloader/lib/softdevice/s132_nrf52_6.1.1/s132_nrf52_6.1.1_softdevice.hex \
- bootloader/_build-nitrogen_nrf52832/nitrogen_nrf52832_bootloader-*-nosd.hex \
-o bootloader.hex
micropython:
- make -C micropython/mpy-cross $(JOBS)
- make -C micropython/ports/nrf BOARD=dsd6 SD=s132 $(JOBS)
+ $(MAKE) -C micropython/mpy-cross
+ $(MAKE) -C micropython/ports/nrf BOARD=$(BOARD) SD=s132
python3 -m nordicsemi dfu genpkg \
--dev-type 0x0052 \
- --application micropython/ports/nrf/build-dsd6-s132/firmware.hex \
+ --application micropython/ports/nrf/build-$(BOARD)-s132/firmware.hex \
micropython.zip
dfu: