1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

tools/uf2: add uf2conv.py as a flash tool

This commit is contained in:
Benjamin Valentin 2020-07-26 16:13:47 +02:00
parent c9720d16ca
commit b7b208829f
4 changed files with 28 additions and 0 deletions

1
dist/tools/uf2/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
uf2conv.py

12
dist/tools/uf2/Makefile vendored Normal file
View File

@ -0,0 +1,12 @@
PKG_NAME=UF2
PKG_URL=https://github.com/microsoft/uf2.git
PKG_VERSION=41394bd604e341ebcfdf0a8c4acce9ec8fd73d93
PKG_LICENSE=MIT
include $(RIOTBASE)/pkg/pkg.mk
all: $(CURDIR)/uf2conv.py
$(CURDIR)/uf2conv.py:
cp $(PKG_SOURCE_DIR)/utils/uf2conv.py .
chmod a+x uf2conv.py

View File

@ -49,3 +49,8 @@ $(RIOTTOOLS)/lpc2k_pgm/bin/lpc2k_pgm: $(RIOTTOOLS)/lpc2k_pgm/Makefile
@echo "[INFO] lpc2k_pgm binary not found - building it from source now"
@$(MAKE) -C $(RIOTTOOLS)/lpc2k_pgm
@echo "[INFO] lpc2k_pgm binary successfully built!"
$(RIOTTOOLS)/uf2/uf2conv.py: $(RIOTTOOLS)/uf2/Makefile
@echo "[INFO] uf2conv.py not found - fetching it from GitHub now"
CC= CFLAGS= $(MAKE) -C $(RIOTTOOLS)/uf2
@echo "[INFO] uf2conv.py successfully fetched!"

View File

@ -0,0 +1,10 @@
FLASHFILE ?= $(HEXFILE)
FLASHER ?= $(RIOTTOOLS)/uf2/uf2conv.py
FFLAGS ?= $(FFLAGS_OPTS) $(FLASHFILE)
PREFLASH_DELAY ?= 2
ifeq ($(RIOTTOOLS)/uf2/uf2conv.py,$(FLASHER))
FLASHDEPS += $(FLASHER)
endif