https://github.com/iabdalkader/openmv/b ... r/pydfu.py
Unlike dfu-util this actually exits DFU mode and jumps to the main application after finishing the upload (dfu-util 0.7 just gets stuck) even if the jumper is still connected, so it's a one command upload/reset thing.
There's a few extra functions in the script to do single pages at a time (ex. erase pages vs. mass erase, write page vs. write whole binary) this makes it easier to use it from GUIs (for progress bar updates etc...) you can safely ignore those...
There's one drawback, however, It doesn't actually parse dfu files so:
Code: Select all
arm-none-eabi-objcopy -Obinary firmware.elf firmware.bin
./pydfu.py firmware.bin