Saturday, 12 January 2019

How to upgrade bootloader on DigiSpark

1. install digistump support in arduino:

add http://digistump.com/package_digistump_index.json to board manager urls  (file -> preferencies ... )

restart arduino

then install digistamp avr boards support in board manager (Tools->Board->Board manager)

then, download latest bootloader for attiny85: https://raw.githubusercontent.com/micronucleus/micronucleus/master/upgrade/releases/upgrade-t85_default.hex

flash it:
~/.arduino15/packages/digistump/tools/micronucleus/2.0a4/launcher -cdigispark  --timeout 60 -Uflash:w:~/tmp/upgrade-t85_default.hex:i

then new micronucleus binary need to be compiled, cose one installed (2.0a4)  did not support bootloader version 2.3 and this error happens when you try to upload hex:

Warning: device with unknown new version of Micronucleus detected.
This tool doesn't know how to upload to this new device. Updates may be available.
Device reports version as: 2.3


so lets upgrade micronucleus binary:

mkdir ~/tmp;cd ~/tmp

git clone git@github.com:micronucleus/micronucleus.git

cd micronucleus/commandline/ ; make

cd ~/.arduino15/packages/digistump/tools/micronucleus/2.0a4/

mv micronucleus micronucleus.old

cp ~/tmp/micronucleus/commandline/micronucleus .


done