Digistump Forums
The Digispark => Digispark Pro Support => Topic started by: magnets on August 10, 2015, 03:25:34 am
-
So i'm running ubuntu 64 bit.
i have arduino 1.6.5 and followed the wiki instructions on supporting the digispark pro through arduino.
when i try and upload i get the following error
Device reports version as: 2.0
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.
i had a good google and have tried the following:
I have ensured i am in the dial out group
i read this post which stated it might be a old version of micronucleus
http://digistump.com/board/index.php?topic=1673.0
however when i do the same query i only get
./home/bob/.arduino15/packages/digistump/tools/micronucleus
./home/bob/.arduino15/packages/digistump/tools/micronucleus/2.0a4/micronucleus
so i though maybe my one isn't the right one
as per this post https://digistump.com/board/index.php?topic=1693.0
but i tried the micronucleus attatched to that post and that didin't work either
i tried installing the 32 bit version of libusb via this post
http://askubuntu.com/questions/311401/libusb-0-1-so-4-shared-lib-error-in-ubuntu-64-bit-system
but that also didn't help
i've added the udev rules
i've rebooted
i'm out of ideas...
any help would be greatly appreciated.
-
thanks for the response Ralf!
i tried that command, at the home level, and in the tools folder (i'm fairly new to linux) and as sudo but everytime i get no response
bob@Slaptop:~/.arduino15/packages/digistump/tools$ which micronucleus
bob@Slaptop:~/.arduino15/packages/digistump/tools$
i found this post, which seems to agree with your theory, though when i run the suggested fix i don't have an old version
http://digistump.com/board/index.php?topic=1673.0
bob@Slaptop:~/.arduino15/packages/digistump/tools$ sudo su
root@Slaptop:/home/bob/.arduino15/packages/digistump/tools# cd /
root@Slaptop:/# find -name "micronucleus"
./home/bob/Downloads/micronucleus
./home/bob/.arduino15/packages/digistump/tools/micronucleus
./home/bob/.arduino15/packages/digistump/tools/micronucleus/2.0a4/micronucleus
./home/bob/.local/share/Trash/files/micronucleus
root@Slaptop:/#
-
thanks for the help, i followed your advice but i'm more confused than ever
it says command not found.
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ micronucleus --help
micronucleus: command not found
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ ls
launcher micronucleus
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ micronucleus --help
micronucleus: command not found
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ cd micronucleus
bash: cd: micronucleus: Not a directory
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$
using nautilus i've checked that both launcher and micronuclues are read write for everyone and ticked the box that says allow executing file as program.
-
thanks for the tip!
sorry for the delay in coming back to you. sick pet.
i don't get that output! so i'm assuming i don't have version 2, i'm going to see if i can get it now
i get this
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ ./micronucleus --help
usage: micronucleus [--run] [--dump-progress] [--type intel-hex|raw] [--no-ansi] [--timeout integer] [--erase-only] filename
--type [intel-hex, raw]: Set upload file type to either intel hex or raw
bytes (intel hex is default)
--dump-progress: Output progress data in computer-friendly form
for driving GUIs
--erase-only: Erase the device without programming. Fills the
program memory with 0xFFFF. Any files are ignored.
--run: Ask bootloader to run the program when finished
uploading provided program
--no-ansi: Don't use ANSI in terminal output
--timeout [integer]: Timeout after waiting specified number of seconds
filename: Path to intel hex or raw data file to upload,
or "-" to read from stdin
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$
so i'll try and get the correct output on the command line then post back my results
-
ok, as you can see i'm not super good on linux, but this is what i did
i went to the micronucleus site
https://github.com/micronucleus/micronucleus
https://github.com/micronucleus/micronucleus (https://github.com/micronucleus/micronucleus)
and i hit download zip (right hand side near the bottom)
then i extracted the zip to a temporary folder.
and using the command shell (?) i navigated to the folder and got it to list it's contents
bob@Slaptop:~/Downloads/temp/micronucleus-master/commandline$ ls
49-micronucleus.rules builds library Makefile micronucleus.c Readme
then i ran the make command
bob@Slaptop:~/Downloads/temp/micronucleus-master/commandline$ make
Building library: micronucleus_lib...
gcc -L/usr/lib/x86_64-linux-gnu -lusb -Ilibrary -O -g -D LINUX -c library/micronucleus_lib.c
Building library: littleWire_util...
gcc -L/usr/lib/x86_64-linux-gnu -lusb -Ilibrary -O -g -D LINUX -c library/littleWire_util.c
Building command line tool: micronucleus...
gcc -L/usr/lib/x86_64-linux-gnu -lusb -Ilibrary -O -g -D LINUX -o micronucleus micronucleus.c micronucleus_lib.o littleWire_util.o -L/usr/lib/x86_64-linux-gnu -lusb
bob@Slaptop:~/Downloads/temp/micronucleus-master/commandline$
then using nautilus i went to the
home/bob/.arduino15/packages/digistump/tools/micronucleus
folder, and then renamed the current micronucleus as micronucleus.old and pasted in the new micronucleus that the makefile created
now when i run the help i get
bob@Slaptop:~/.arduino15/packages/digistump/tools/micronucleus/2.0a4$ ./micronucleus --help
usage: micronucleus [--help] [--run] [--dump-progress] [--fast-mode] [--type intel-hex|raw] [--timeout integer] [--erase-only] filename [--no-ansi]
--type [intel-hex, raw]: Set upload file type to either intel hex or raw
bytes (intel hex is default)
--dump-progress: Output progress data in computer-friendly form
for driving GUIs
--erase-only: Erase the device without programming. Fills the
program memory with 0xFFFF. Any files are ignored.
--fast-mode: Speed up the timing of micronucleus. Do not use if
you encounter USB errors.
--run: Ask bootloader to run the program when finished
uploading provided program
--no-ansi: Don't use ANSI in terminal output
--timeout [integer]: Timeout after waiting specified number of seconds
filename: Path to intel hex or raw data file to upload,
or "-" to read from stdin
Commandline tool version: 2.0a5
Success!!
in the arduino ide, i try to upload an example
Sketch uses 936 bytes (6%) of program storage space. Maximum is 14,844 bytes.
Global variables use 9 bytes of dynamic memory.
Running Digispark Uploader...
Plug in device now... (will timeout in 60 seconds)
> Please plug in the device ...
> Press CTRL+C to terminate the program.
> Device is found!
connecting: 16% complete
connecting: 22% complete
connecting: 28% complete
connecting: 33% complete
> Device has firmware version 2.0
> Device signature: 0x1e9487
> Available space for user applications: 14970 bytes
> Suggested sleep time between sending pages: 7ms
> Whole page count: 234 page size: 64
> Erase function sleep duration: 1638ms
parsing: 50% complete
> Erasing the memory ...
erasing: 55% complete
erasing: 60% complete
erasing: 65% complete
> Starting to upload ...
writing: 70% complete
writing: 75% complete
writing: 80% complete
> Starting the user app ...
running: 100% complete
>> Micronucleus done. Thank you!
yaaaaaaaaaaaaaaaaaaaaaay
Thanks Ralf!
the only thing i can assume is the digistump arduino script pulled the wrong version of micronucleus (maybe version 2 for 32 bit?) then, because i don't understand Make, i grabbed a wrong version of micruncleus which gave the strange error
for others following along, you'll need to put the udev rules in to get this to work without sudo
-
Thank you Magnet !
I was meeting exactly the same problem than you and I followed your excellent method to re-compile micronucleus and now it worked perfectly !
I had the same problem with my old Digispark and it also settled the problem !
You know what ?
;D :D
-
Compiling had a problem with a missing dependency:
> make
make: libusb-config: Command not found
make: libusb-config: Command not found
Building library: micronucleus_lib...
gcc -Ilibrary -O -g -D LINUX -c library/micronucleus_lib.c
In file included from library/micronucleus_lib.c:30:0:
library/micronucleus_lib.h:35:80: fatal error: usb.h: No such file or directory
#include <usb.h> // this is libusb, see http://libusb.sourceforge.net/
^
compilation terminated.
Makefile:49: recipe for target 'micronucleus_lib' failed
make: *** [micronucleus_lib] Error 1
Per this note: http://askubuntu.com/questions/503928/missing-usb-h-file-what-is-it-where-do-i-get-it
the solution was:
sudo apt-get install libusb-dev
That got me a clean compile. Don't know yet if I'm going to get a usable micronucleus or not ...
-
Can anyone help me??
I don't exactly understand that part : "home/bob/.arduino15/packages/digistump/tools/micronucleus
folder, and then renamed the current micronucleus as micronucleus.old and pasted in the new micronucleus that the makefile created"
Can you explain it to me ??
-
Welcome to the forum kjubow! ;)
What 'magnets' did was basically:
- Download/clone the source code for micronucleus from https://github.com/micronucleus/micronucleus (https://github.com/micronucleus/micronucleus)
- Unzip the file, and navigate to the location of the unpacked files in a terminal window
- Once he was in that folder, ran the 'make' command to compile the micronucleus executable
- He then copied the resulting executable to his /home/username/.arduino15/packages/digistump/tools/micronucleus directory, renaming the old file first
- And then tested it to make sure it worked as expected
First thing is first... are you on linux? As this was specific to linux (and a Ubuntu/Debian flavour of linux at that).
And secondly, how familiar with linux are you? (I'm guessing not very if you don't recognise the /home path - but that's ok - just need to know the baseline from which to provide instructions)
-
Yes, im running ubuntu. Thanks for reply ;)