This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
digispark:tutorials:linuxtroubleshooting [2013/08/23 20:54] CBcracker |
digispark:tutorials:linuxtroubleshooting [2017/12/03 11:41] Jamezrin [Arch Troubleshooting] |
||
|---|---|---|---|
| Line 4: | Line 4: | ||
| ====== libusb ====== | ====== libusb ====== | ||
| - | If your sketch uses DigiUSB to communicate with the PC, you need the legacy 0.1 version of libusb (http://www.libusb.org/). For compiling the DigiUSB programs, ensure the package libusb-compat-devel is installed. | + | 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. |
| - | ====== permissions ====== | + | 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 14: | Line 16: | ||
| Bad permissions generally cause the "Abort mission! -1 error has occurred ..." 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. | "micronucleus: library/micronucleus_lib.c:63: micronucleus_connect: Assertion `res >= 4' failed." is also a result of bad permissions. | ||
| + | |||
| ====== Ubuntu Troubleshooting ====== | ====== Ubuntu Troubleshooting ====== | ||
| Line 22: | 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 42: | 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 | ||
| + | |||