Author Topic: Helper script for updating Retrode firmware on Linux (or macOS+dfu-programmer)  (Read 250 times)

Offline ssokolow

  • Baby Retrode
  • *
  • Posts: 24
  • Karma: +12/-0
    • View Profile
Since I got tired of having to keep refreshing my memory on the procedure for updating a Retrode's firmware on Linux, I wrote a little shell script to automate the process as much as possible.

...and, being the risk-averse perfectionist with a focus on UI/UX design that I am, I also built as many safety checks into it as I could without turning it into a massive project.

I've posted it as this GitHub Gist and, in case I ever move it from there and forget to leave a note on the new location, here's the blog post I used to announce it.

It hasn't been tested on OSX but, in theory, it should work. It has been used successfully on macOS 10.12.6. (I only rely on dfu-programmer and POSIX-specified commands.)

I hope this helps someone. :)

P.S. If anyone's interested in helping me to improve this, here are the things I need help with:

  • Getting a copy of the output a Retrode 1 produces from the various "dfu-programmer at90usb646 get ..." commands to see if there's any way I can tighten the safety checks so they verify that the detected at90usb646-based device in programming mode is actually a Retrode. (I only have a Retrode 2)
  • Determining whether it's safe to automate the final "please press Reset" using "dfu-programmer at90usb646 reset", given that the instructions I worked from only explicitly warn against "dfu-programmer at90usb646 start".
  • Identifying the exact maximium filesize(s) to limit to in order to safely die with an informative "Too big to be a valid image for this Retrode" message.
  • Finding more ways to detect invalid or mismatched firmware images before attempting to write them. (eg. Is there a reliable way to tell Retrode 1 and Retrode 2 images apart by their contents, rather than expecting a human to parse the filenames?)
« Last Edit: 20/Nov/2017 01:41:25 AM by ssokolow »

Offline Lennart

  • Baby Retrode
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Helper script for updating Retrode firmware on Linux
« Reply #1 on: 13/Nov/2017 07:07:38 PM »
I tried out this script on my Mac with macOS Sierra (10.12.6) and it successfully updated my Retrode 2 to the 0.23 firmware. Thanks! :)

Offline ssokolow

  • Baby Retrode
  • *
  • Posts: 24
  • Karma: +12/-0
    • View Profile
Re: Helper script for updating Retrode firmware on Linux
« Reply #2 on: 20/Nov/2017 01:36:00 AM »
I tried out this script on my Mac with macOS Sierra (10.12.6) and it successfully updated my Retrode 2 to the 0.23 firmware. Thanks! :)

Happy to hear it. :)

I've updated the initial post's comment about macOS accordingly.