User Tools

Site Tools


digispark:tutorials:linuxtroubleshooting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
digispark:tutorials:linuxtroubleshooting [2013/01/27 17:56]
RussNelson [Linux Troubleshooting]
digispark:tutorials:linuxtroubleshooting [2016/06/09 12:03]
127.0.0.1 external edit
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 9: 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 ======
 +
 +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), compiling is the only option
 +
 +<​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
 +
digispark/tutorials/linuxtroubleshooting.txt · Last modified: 2017/12/03 11:41 by Jamezrin