Closed trentgill closed 3 years ago
We could try using https://github.com/micropython/micropython/blob/master/tools/pydfu.py to see if it works for our purposes. It would mean just a simple python dependency/vendored module instead of having to document or manage installing dfu-util which seems like a bad idea.
There might be more implementations that could work, a quick search turned up https://github.com/ABCDeath/stm32-uart-dfu
Re-raising this as it would be a really nice thing alongside crow 3.0 I found another similar solution here https://github.com/odriverobotics/ODrive/blob/devel/tools/odrive/dfu.py
This is doubly important because i've found on my new system (ubuntu virtual machine on win10) that dfu-util hangs for a long time before releasing the device (over a minute sometimes). dfu-util seems like it would be good to be rid of.
Further - the druid concept has a lot of utility for some future projects i'm thinking about, and the idea that it could roll the bootloader in too, makes it even more compelling.
///
Really just need someone to try getting one of these pydfu.py style scripts to upload the firmware to crow from the command line. I'll try and find time in the next couple weeks.
initial work added to branch pydfu
: https://github.com/monome/druid/compare/pydfu?expand=1
managed to get my crow in an unresponsive state (bad flash) and don't have a screwdriver nearby to force the bootloader, so i'm stopping for now.
this should be pretty straightforward to complete, and i'll clean up the code prior to PR.
Fixed in #68
is it possible to add functionality to druid such that it can:
dfu-util
^^i
to show the version is updatedin doing this, rather than going via
<lost connection>
, it should print<entering bootloader>
then<crow updated to version ____>