summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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: