diff options
| author | Dave Hylands | 2014-10-21 22:27:33 -0700 |
|---|---|---|
| committer | Damien George | 2014-10-22 20:18:38 +0100 |
| commit | 842210f53a24666206caaff135cc2dbdc259e1e3 (patch) | |
| tree | 242ad8078720bfb1ea91ff0ac118cf32357e4957 /stmhal | |
| parent | e7a478204a984f9f79a99700375d961be6d28a96 (diff) | |
Add pydfu.py to the micropython tree. Use dfu_util bgy default
You can do:
make USE_PYDFU=1 deploy
to use pydfu.py
Diffstat (limited to 'stmhal')
| -rw-r--r-- | stmhal/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/stmhal/Makefile b/stmhal/Makefile index 7e825279f..b3b2d7a9b 100644 --- a/stmhal/Makefile +++ b/stmhal/Makefile @@ -24,6 +24,8 @@ USBDEV_DIR=usbdev FATFS_DIR=fatfs DFU=../tools/dfu.py # may need to prefix dfu-util with sudo +USE_PYDFU ?= 0 +PYDFU = ../tools/pydfu.py DFU_UTIL ?= dfu-util DEVICE=0483:df11 @@ -249,7 +251,11 @@ all: $(BUILD)/firmware.dfu $(BUILD)/firmware.hex deploy: $(BUILD)/firmware.dfu $(ECHO) "Writing $< to the board" +ifeq ($(USE_PYDFU),1) + $(Q)$(PYTHON) $(PYDFU) -u $< +else $(Q)$(DFU_UTIL) -a 0 -d $(DEVICE) -D $< +endif $(BUILD)/firmware.dfu: $(BUILD)/firmware.elf $(ECHO) "Create $@" |
