Makefile: Get user to supply BOARD= and job count
This commit is contained in:
parent
2a7d892191
commit
6e9cff06d5
1 changed files with 9 additions and 9 deletions
18
Makefile
18
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:
|
||||
|
|
Loading…
Reference in a new issue