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:
parent
c9720d16ca
commit
b7b208829f
1
dist/tools/uf2/.gitignore
vendored
Normal file
1
dist/tools/uf2/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
uf2conv.py
|
12
dist/tools/uf2/Makefile
vendored
Normal file
12
dist/tools/uf2/Makefile
vendored
Normal 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
|
@ -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!"
|
||||
|
10
makefiles/tools/uf2conv.inc.mk
Normal file
10
makefiles/tools/uf2conv.inc.mk
Normal 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
|
Loading…
Reference in New Issue
Block a user