Main Menu

search

You are here

Digispark Pro: unknown Micronucleus

[last updated: 2020-05-28]
go to: Digispark home page
go to: Digispark Pro home page
-----

No resolution yet ... but this page is my gyrations attempting to get IDE to upload a program to the DgPro

  • The first time I tried to upload a sketch to a Digispark Pro (on my Dell Precision 4400), I got this error:
    "unknown new version of Micronucleus detected"
    "device reports version 2.0"
    but forums suggest the IDE expects version 1.x
  • Tools > Boards and click Boards Manager
    but Digistump AVR 1.6.7 was already installed, which included Digispark Pro
  • Googled error and found:
    • "The Digispark Pro uses a 2.x firmware, because the 1.x version does not support the ATtiny 167"
    • "Somewhere on your system (in your path presumably) you have an old version of micronucleus - maybe try "whereis micronucleus" "
      • executing: / $ whereis micronucleus
        returns "micronucleus:"
        [meaning what? do you suppose???]
    • On my Linux Dell Precision, micronucleus.exe is located in:
      ~/Arduino/DigistumpDrivers
      executing: $ micronucleus -- help
      from within that directory returns "micronucleus: command not found"
        OTOH, on Linux Dell tower, ~/Arduino does not have a DigistumpDrivers folder
        This is with Arduino 1.8.11 and Linux Mint 19.2

    ---------------------------------------------------

  • Researching ... links to investigate:
    • (link to:) digistump wiki - getting started
    • Proceding to follow (link to:) this digistump tutorial on Dell Tower Linux:
      • install and run IDE
      • File > Preferences
        In “Additional Boards Manager URLs” enter:
        http:// digistump.com/package_digistump_index.json
        click OK
      • Tools > Boards > Boards Manager > Contributed
      • Select “Digistump AVR Boards”, and click Install.
      • Close the Boards Manager.
        Tools > Boards > Digispark Pro (Default 16mhz)
      • For Linux:
        If you haven't before - Install the udev rules found here:
        (link to:) Linux Troubleshooting
        • cut and pasted file contents into text editor, and attempted to save-as to the /etc/udev/rules.d directory,
          but got permission error
        • saved file to /home/jay
        • $ sudo su
          $ cp 49-micronucleus.rules /etc/udev/rules.d
          executed successfully
      • OTOH, going through procedure to upload a program from IDE to DPro gave same error.

      ---------------------------------------------

    • Trying this from user Magnets, posted Aug 2015: (link to:) digistump forum
      • downloaded: micronucleus-master.zip from: (link to:) github micronucleus
        • Saved to Downloads/micronucleus-TEMP,
          extracted to create .../micronucleus-master folder
        • Readme file explains that micronucleus is a bootloader, designed to allow uploading new firmware via USB to ATtiny products.
        • "...the command line tool should to be started on the host computer _before_ the bootloader is invoked."
        • "... it is invoked at device reset and will identify to the host computer."
      • After extracting, the commandline directory that he sees does not contain a micronucleus.exe like mine does.
        So I disabled it by renaming:
        $ sudo mv micronucleus.exe micronucleus.old
      • Then execute the 'make' command, which will run the makefile
        $ make
        fatal error for not finding library/micronucleus_lib.h:35:10: and usb.h
      • Hacked around and did a bunch of stuff I didn't record, but eventually got the make command to work,
        perhaps having followed this suggestion in some other post:
        $ sudo apt-get install libusb-dev
      • In any case, the make command created a file named: micronucleus, with no extension, but colored green, which online says is an executable file.

        ----------------------------------

      • More forum searching found this from user PeterF, posted Sep 2017: (link to:) digistump forum
        He explained the post from Magnets:
          run the 'make' command to compile the micronucleus executable
          copy the resulting executable to /home/username/.arduino15/packages/digistump/tools/micronucleus directory (renaming the old file first)
          test to make sure it worked

        However:

          I don't have a .../.arduino15 folder, nor any packages folder under arduino-1.8.11 or ...12
          I did however find: /media/jay/OS/Documents and Settings/Jay/Local Settings/Arduino15/packages/digistump/tools/micronucleus/2.0a4
          which contains, among other files:
            install.exe
            micronucleus.exe
            launcher.exe

          Regardless I proceeded, and (after renaming micronucleus.exe to ...old) copied the micronucleus file created by the make command into the 2.0a4 folder...

        But it still does not work, giving "unknown micronucleus" error in IDE when uploading to digiPro

        ---------------------------------

      • just hacking...
      • in the makefile there is a line:
        cp micronucleus /usr/local/bin
      • tried it:
        $ cp ...
        no such file or directory
        changed file back from .old to .exe, same result
        ----------------------------------
      • forum post says, from within 20a4 directory, where micronucleus.exe is located, I should be able to run:
        $ ./micronucleus --help
        and indeed, after doing whatever above, this worked.
      • However after restarting IDE, got same error trying to upload a program to the DigiPro
    • (link to:) github DigistumpArduino
    • (link to:) github bootloader & micronucleus

    • (link to:) upload a new bootloader

    • (link to:) github bootloader

.

.

.

eof