This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
digispark:tutorials:linuxtroubleshooting [2013/01/05 00:21] digistump created |
digispark:tutorials:linuxtroubleshooting [2017/12/03 11:41] (current) Jamezrin [Arch Troubleshooting] |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| First see the main [[http://digistump.com/wiki/digispark/tutorials/connecting?&#troubleshooting|troubleshooting section]] | First see the main [[http://digistump.com/wiki/digispark/tutorials/connecting?&#troubleshooting|troubleshooting section]] | ||
| + | |||
| + | ====== libusb ====== | ||
| + | If your sketch uses DigiUSB to communicate with the PC, you need both the legacy 0.1 version of libusb and version 1.0(http://www.libusb.org/). For compiling the DigiUSB programs, also ensure the package libusb-compat-devel is installed. | ||
| + | |||
| + | If you are getting an error (especially on ubuntu) when compiling or uploading sketches - try installing libusb and possibly lib32stdc on linux - (on ubuntu get it by issuing: apt-get install lib32stdc++6) | ||
| + | |||
| + | ====== Permissions ====== | ||
| Try running Arduino as root. If possible try the whole process as root. | Try running Arduino as root. If possible try the whole process as root. | ||
| Line 7: | Line 14: | ||
| If using Ubuntu or similar try the step below, if not make sure you have proper permission for the device. | If using Ubuntu or similar try the step below, if not make sure you have proper permission for the device. | ||
| - | Bad permissions generally cause the "Abort mission! -1 error has occured ..." error during upload. | + | Bad permissions generally cause the "Abort mission! -1 error has occurred ..." error during upload. |
| + | "micronucleus: library/micronucleus_lib.c:63: micronucleus_connect: Assertion `res >= 4' failed." is also a result of bad permissions. | ||
| ====== Ubuntu Troubleshooting ====== | ====== Ubuntu Troubleshooting ====== | ||
| + | |||
| + | If you get ''java: not found'', install a Java package, such as OpenJDK. | ||
| If you are running Ubuntu (and possible some other distros) and getting errors on upload or other strange results try this: (from: https://github.com/Bluebie/micronucleus-t85/wiki/Ubuntu-Linux) | If you are running Ubuntu (and possible some other distros) and getting errors on upload or other strange results try this: (from: https://github.com/Bluebie/micronucleus-t85/wiki/Ubuntu-Linux) | ||
| Line 15: | Line 25: | ||
| Ubuntu and other modern Linux distibutions use udev to manage device files when USB devices are added and removed. By default, udev will create a device with read-only permission which will not allow to you download code. You must place the udev rules below into a file named /etc/udev/rules.d/49-micronucleus.rules | Ubuntu and other modern Linux distibutions use udev to manage device files when USB devices are added and removed. By default, udev will create a device with read-only permission which will not allow to you download code. You must place the udev rules below into a file named /etc/udev/rules.d/49-micronucleus.rules | ||
| - | These rules are adapted from those used for Teensy boards, maintained [here](http://www.pjrc.com/teensy/49-teensy.rules) | + | These rules are adapted from those used for Teensy boards, maintained by [[http://www.pjrc.com/teensy/49-teensy.rules|PJRC]] |
| <code> | <code> | ||
| Line 35: | Line 45: | ||
| # GROUP:="somegroupname" and mange access using standard unix groups. | # GROUP:="somegroupname" and mange access using standard unix groups. | ||
| </code> | </code> | ||
| + | |||
| + | Perhaps it's necessary to reload the rules as root. | ||
| + | |||
| + | <code>udevadm control --reload-rules</code> | ||
| + | |||
| + | ====== Arch Troubleshooting ====== | ||
| + | |||
| + | The AUR arduino package will not work since it is version 1.0.6! You need to install 1.5.8 from the [[http://arduino.cc/download.php?f=/arduino-1.5.8-linux64.tgz|Arduino page]] or if you have a [[http://arduino.cc/download.php?f=/arduino-1.5.8-linux32.tgz|32 bit system]]. | ||
| + | |||
| + | You will also need the latest Digispark files that you can get by: | ||
| + | |||
| + | <code> | ||
| + | git clone https://github.com/digistump/DigistumpArduino | ||
| + | </code> | ||
| + | |||
| + | Unpack the Arduino zip to a folder of your choice and copy the digistump folder from /hardware in your git clone to .../Arduino/arduino-1.5.8/hardware/ | ||
| + | |||
| + | Unpack the zip for your architecture in .../Arduino/arduino-1.5.8/hardware/digistump/avr/tools/ | ||
| + | It will be either linux32binaries.tar or linux64binaries.tar | ||
| + | |||
| + | You will also need the 0.1 version of the libusb library which you can get on Arch by | ||
| + | |||
| + | <code> | ||
| + | sudo pacman -S libusb-compat | ||
| + | </code> | ||
| + | |||
| + | The last part is getting the micronucleus to work. For this (at least on 64 bit systems), you can install the AUR package [[https://aur.archlinux.org/packages/micronucleus-git/|micronucleus-git]] or compile it yourself. | ||
| + | |||
| + | <code> | ||
| + | git clone https://github.com/micronucleus/micronucleus.git | ||
| + | cd micronucleus/commandline | ||
| + | make | ||
| + | </code> | ||
| + | |||
| + | Copy the resulting micronucleus executable into .../Arduino/arduino-1.5.8/hardware/digistump/avr/tools/ and you should be good to go. | ||
| + | |||
| + | Also take care of the udev rules, as with all other Linux distributions | ||
| + | |||