add uf2 target for uf2 bootloader board: metro m0/m4 feather nrf52840
This commit is contained in:
@@ -12,6 +12,7 @@ MKDIR = mkdir
|
||||
SED = sed
|
||||
CP = cp
|
||||
RM = rm
|
||||
PYTHON ?= python
|
||||
|
||||
# Select the board to build for.
|
||||
ifeq ($(BOARD),)
|
||||
|
@@ -43,6 +43,8 @@ endif
|
||||
.DEFAULT_GOAL := all
|
||||
all: $(BUILD)/$(BOARD)-firmware.bin size
|
||||
|
||||
uf2: $(BUILD)/$(BOARD)-firmware.uf2
|
||||
|
||||
OBJ_DIRS = $(sort $(dir $(OBJ)))
|
||||
$(OBJ): | $(OBJ_DIRS)
|
||||
$(OBJ_DIRS):
|
||||
@@ -60,6 +62,11 @@ $(BUILD)/$(BOARD)-firmware.hex: $(BUILD)/$(BOARD)-firmware.elf
|
||||
@echo CREATE $@
|
||||
@$(OBJCOPY) -O ihex $^ $@
|
||||
|
||||
UF2_FAMILY ?= 0x00
|
||||
$(BUILD)/$(BOARD)-firmware.uf2: $(BUILD)/$(BOARD)-firmware.hex
|
||||
@echo CREATE $@
|
||||
$(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY) -c -o $@ $^
|
||||
|
||||
# We set vpath to point to the top of the tree so that the source files
|
||||
# can be located. By following this scheme, it allows a single build rule
|
||||
# to be used to compile all .c files.
|
||||
|
Reference in New Issue
Block a user