monome / druid

terminal interface for crow
GNU General Public License v3.0
35 stars 16 forks source link

roll bootloader into druid #15

Closed trentgill closed 3 years ago

trentgill commented 4 years ago

is it possible to add functionality to druid such that it can:

  1. install dfu-util
  2. fetch the current latest-release from github.com/monome/crow
  3. execute the flash.sh script
  4. reconnect to crow in druid & query ^^i to show the version is updated

in doing this, rather than going via <lost connection>, it should print <entering bootloader> then <crow updated to version ____>

simonvanderveldt commented 4 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

trentgill commented 3 years ago

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.

tehn commented 3 years ago

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.

simonvanderveldt commented 3 years ago

Fixed in #68