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

10 comments:

  1. I programmed my digispart attiny85 with icsp and wiped the bootloader. The bootload for this board does not reside with in the arduino ide. I found a current bootloader on github and uploaded it to the board. But when i went to flash my user program I got the error msg shown in this blog. I was pretty much lost as I did not know what was going on until I found your blog along with the same error msg. Thank you very much, how did you learn this stuff as the documentation on github for this tools is pretty much non-existant. Thanks again.

    ReplyDelete
    Replies
    1. hey man can you upload your micronucleus in mediafire and provide the link
      i can not compile it even if i have installed libusb
      i dont know what's wrong
      please upload it!

      Delete
  2. Thanks a lot!
    I bought a Chinese Digispark and I got errors because of "2.2 version" of the Bootloader. I upgraded with your instructions and now it works.

    ReplyDelete
  3. When I upgraded micronucleus, following your tutorial. It doesn't find the digispark, when i run ./micronucleus --erase-only, it says:
    > Please plug in the device ...
    > Press CTRL+C to terminate the program.
    I upgraded it because the version of the bootloader was wrong.
    Please help me

    ReplyDelete
    Replies
    1. after flashing "upgrade" firmware you must wait for upgrade bootloader to be written in place of old one, this is indicated by flashing LED:
      https://github.com/ArminJo/micronucleus-firmware/blob/master/firmware/upgrades/README.md

      try to leave it connected to computer for minute or so, if your board did not come back to life, then something is wrong, and you need to flash it using ICSP with https://raw.githubusercontent.com/micronucleus/micronucleus/master/firmware/releases/t85_default.hex

      t.

      Delete
    2. I had forgotten to activate the udev rules for micronucleus. Now it works

      Delete
  4. I've flashed it. It has worked. But now the tiny85 is dead. lsusb shows: ID 16d0:0753 MCS Digistump DigiSpark but arduino doesn't recognized it. Also flashing again is not working.

    ReplyDelete
    Replies
    1. take a look here: https://digistump.com/wiki/digispark/tutorials/linuxtroubleshooting

      Delete