https://wiki.archlinux.org/api.php?action=feedcontributions&user=Kardech&feedformat=atomArchWiki - User contributions [en]2024-03-29T00:06:35ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Arduino&diff=181854Arduino2012-02-03T22:06:40Z<p>Kardech: The USB ttys seem to have been renamed recently.</p>
<hr />
<div>[[Category:Development (English)]]<br />
[[Category:Mathematics and science (English)]]<br />
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. More information is availible on the [http://www.arduino.cc/ Arduino HomePage].<br />
<br />
==Installation==<br />
<br />
* Install {{AUR|arduino}} from the [[Arch User Repository|AUR]].<br />
* Add yourself to the {{ic|uucp}} [[Users and Groups|group]]. (More information in the next section: "Accessing serial")<br />
<br />
==Configuration==<br />
<br />
===Accessing serial===<br />
<br />
The arduino board communicates with the PC via a serial connection or a serial over USB connection. So the user needs read/write access to the serial device file. [[Udev]] creates files in /dev/tts/ owned by group uucp so adding the user to the uucp group gives the required read/write access.<br />
<br />
gpasswd -a <user> uucp<br />
<br />
{{Note|You'll have to logout and login again for this to take effect.}}<br />
<br />
Briefly run the {{ic|arduino}} command and stop it, then modify {{ic|~/.arduino/preferences.txt}} .<br />
<br />
Change serial port from COM1 to your serial port. With your arduino board connected, you can find out what your serial port is with:<br />
<br />
ls /dev/ttyUSB* /dev/ttyACM*<br />
<br />
If in doubt, unconnect the board and look which of these disappears, and/or monitor {{ic|/var/log/everything.log}}.<br />
<br />
The line to change in {{ic|~/.arduino/preferences.txt}} should look something like this when you're done:<br />
<br />
serial.port=/dev/ttyACM3<br />
<br />
Rerun {{ic|arduino}}. If you get a message like "Arduino Uno on COM1" message in the GUI's lower right corner, connection has been established.<br />
<br />
==Working with Uno/Mega2560==<br />
<br />
The Arduino Uno and Mega2560 have an onboard USB interface (an Atmel 8U2) that accepts serial data, so they are accessed through /dev/ttyACM0 created by the cdc-acm kernel module when it is plugged in.<br />
<br />
The 8U2 firmware may need an update to ease serial communications. See [http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286350399] for more details and reply #11 for a fix. The original arduino bbs, where you can find an image explaining how to get your Uno into DFU, is now in a read-only state. If you do not have an account to view the image, see [http://www.scribd.com/doc/45913857/Arduino-UNO].<br />
<br />
You can perform a general function test of the Uno by putting it in loopback mode and typing characters into the arduino serial monitor at 115200 baud. It should echo the characters back to you. To put it in loopback, short pins 0 -> 1 on the digital side and either hold the reset button or short the GND -> RESET pins while you type.<br />
<br />
== Running Arduino Uno ==<br />
<br />
Once Arduino is running you must ensure you have selected the correct board from the Tools->Boards menu item:<br />
Arduino Uno<br />
<br />
Secondly you must ensure you have selected the correct serial port from the Tools->Serial Port menu item as explained above.<br />
<br />
Once these are done you should be able to write and upload sketches to your Arduino Uno without any issues.<br />
<br />
<br />
==Alternatives for IDE==<br />
<br />
===Arduide===<br />
<br />
ArduIDE is a Qt-based IDE for Arduino and is available to [https://aur.archlinux.org/packages.php?ID=39927 download] from aur.<br />
<br />
If you prefer working from terminal, below there are some other options to choose from.<br />
<br />
===Scons===<br />
<br />
Using [http://www.scons.org/ scons] together with [http://code.google.com/p/arscons/ arscons] it is very easy to use to compile and upload Arduino projects from the command line. Scons is based on python and you will need python-pyserial to use the serial interface. Install everything with<br />
<br />
# pacman -S python-pyserial scons<br />
<br />
That will get the dependencies you need too. You will also need Arduino itself so install it as described above. Create project directory (eg. test), then create a arduino project file in your new directory. Use the same name as the directory and add .pde (eg. test.pde). Get the [http://arscons.googlecode.com/git/SConstruct SConstruct] script from arscons and put it in your directory. Have a peek in it and, if necessary, edit it. It's a python script. Edit your project as you please, then run<br />
<br />
$ scons # This will build the project<br />
$ scons upload # This will upload the project to your Arduino<br />
<br />
===Makefile===<br />
Update 2011-03-12. Arduino Is not shipping a Makefile with version (22). The Makefile from the [http://code.google.com/p/dogm128/source/browse/libraries/Dogm/examples/SpaceTrash/Makefile.uno_dogs102 dogm128] project works for me though.<br />
<br />
Instead of using the arduino IDE it's possible to use another editor and a Makefile.<br />
<br />
Set up a directory to program your Arduino and copy the Makefile into this directory. A copy of the Makefile can be obtained from /usr/share/arduino/hardware/cores/arduino/Makefile<br />
<br />
You will have to modify this a little bit to reflect your settings. The makefile should be pretty self explainatory. Here are some lines you may have to edit.<br />
<br />
PORT = usually /dev/ttyUSBx, where x is the usb serial port your arduino is plugged into<br />
TARGET = your sketch's name<br />
ARDUINO = /usr/share/arduino/lib/targets/arduino<br />
<br />
Depending on which library functions you call in your sketch, you may need to compile parts of the library. To do that you need to edit your SRC and CXXSRC to include the required libraries.<br />
<br />
Now you should be able to make && make upload to your board to execute your sketch.<br />
<br />
===Arduino-CMake===<br />
<br />
Using [https://github.com/queezythegreat/arduino-cmake arduino-cmake] and [http://www.cmake.org/cmake/resources/software.html CMake] you can build Arduino firmware from the command line using multiple build systems. CMake lets you generate the build system that fits your needs, using the tools you like. It can generate any type of build system, from simple Makefiles, to complete projects for Eclipse, Visual Studio, XCode, etc.<br />
<br />
Requirements:<br />
* [http://www.archlinux.org/packages/?sort=&q=cmake CMake]<br />
* [https://aur.archlinux.org/packages.php?ID=8388 Arduino SDK]<br />
* [http://www.archlinux.org/packages/?sort=&q=gcc-avr gcc-avr]<br />
* [http://www.archlinux.org/packages/?sort=&q=binutils-avr binutils-avr]<br />
* [http://www.archlinux.org/packages/?sort=&q=avr-libc avr-libc]<br />
* [http://www.archlinux.org/packages/?sort=&q=avrdude avrdude]<br />
<br />
==Troubleshooting==<br />
<br />
===delay() function doesn't work===<br />
There are some cases where the delay() function doesn't work, causing programs such as the example [http://www.arduino.cc/en/Tutorial/Blink Blink] to malfunction. <br />
It appears that the Arch compiler sometimes generates code that writes to addresses before the start of memory. RAM starts at address 0x200 on the mega, but the Blink code has the delay() timer variables located at 0x100-0x10b. This only seems to happen when the code contains no initialized global variables (.data segment in asm-speak) - the linker is told that the data segment starts at 0x200, but if there's nothing to go in it it generates an incorrect start address for the uninitialized global variables (.bss segment). Since the timer variables are uninitialized globals (or globals initialized to zero) they end up at an illegal address.<br />
<br />
There are currently two ways to bypass this issue.<br />
<br />
* Use '''Serial.begin(9600);''' in '''setup()''' function. [[http://forums.adafruit.com/viewtopic.php?f=25&t=21075 Source post]] <br />
<br />
<pre><br />
/*<br />
Blink<br />
Turns on an LED on for one second, then off for one second, repeatedly.<br />
<br />
This example code is in the public domain.<br />
*/<br />
<br />
void setup() { <br />
// initialize the digital pin as an output.<br />
// Pin 13 has an LED connected on most Arduino boards:<br />
pinMode(13, OUTPUT); <br />
Serial.begin(9600);<br />
}<br />
<br />
void loop() {<br />
digitalWrite(13, HIGH); // set the LED on<br />
delay(1000); // wait for a second<br />
digitalWrite(13, LOW); // set the LED off<br />
delay(1000); // wait for a second<br />
}<br />
</pre><br />
<br />
* Use an initialized global variable. [[http://arduino.cc/forum/index.php/topic,49900.msg363688.html#msg363688 Source post]]<br />
<br />
<pre><br />
char dummyvariablecuzmaintainerborkedthecompiler = 123; // force something into the .data segment with non-zero initializer<br />
/*<br />
Blink<br />
Turns on an LED on for one second, then off for one second, repeatedly.<br />
<br />
This example code is in the public domain.<br />
*/<br />
<br />
void setup() { <br />
dummyvariablecuzmaintainerborkedthecompiler++; // stops the linker from removing the global variable<br />
<br />
// initialize the digital pin as an output.<br />
// Pin 13 has an LED connected on most Arduino boards:<br />
pinMode(13, OUTPUT); <br />
}<br />
<br />
void loop() {<br />
digitalWrite(13, HIGH); // set the LED on<br />
delay(1000); // wait for a second<br />
digitalWrite(13, LOW); // set the LED off<br />
delay(1000); // wait for a second<br />
}</pre><br />
<br />
Related pages:<br />
* http://arduino.cc/forum/index.php/topic,56841.0.html<br />
* http://arduino.cc/forum/index.php/topic,49900.0.html<br />
* http://arduino.cc/forum/index.php?topic=59409.0.html<br />
<br />
Fedora has the same problem with binutils 2.21 ([https://bugzilla.redhat.com/show_bug.cgi?id=688645 bug report]).<br />
Downgraded packages that work are binutils-avr 2.20.1-3 and gcc-avr 4.5.1-2. <br />
There is also an upstream bug report [http://sourceware.org/bugzilla/show_bug.cgi?id=12757 here] but no one has replied yet.<br />
<br />
=== Error opening serial port ===<br />
You may see the serial port initially when the IDE starts, but the TX/RX leds do nothing when uploading. You may have previously changed the baudrate in the serial monitor to something it doesn't like. Edit ~/.arduino/preferences.txt so that serial.debug_rate is a different speed, like 115200.<br />
<br />
=== Arduino Mega2560 and new gcc-avr ===<br />
<br />
If you are using gcc-avr >= 4.3.5 then there is a C++ bug in the gcc-avr toolchain which builds bad firmware for the Atmel2560 processors. gcc-avr must be rebuilt using a patch found at [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45263]. You can read more about the problems at [http://andybrown.me.uk/ws/2010/10/24/the-major-global-constructor-bug-in-avr-gcc/].<br />
<br />
Here is the patch for gcc:<br />
<pre><br />
--- gcc-4.5.1.orig/gcc/config/avr/libgcc.S 2009-05-23 17:16:07 +1000<br />
+++ gcc-4.5.1/gcc/config/avr/libgcc.S 2010-08-12 09:38:05 +1000<br />
@@ -802,7 +802,9 @@<br />
mov_h r31, r29<br />
mov_l r30, r28<br />
out __RAMPZ__, r20<br />
+ push r20<br />
XCALL __tablejump_elpm__<br />
+ pop r20<br />
.L__do_global_ctors_start:<br />
cpi r28, lo8(__ctors_start)<br />
cpc r29, r17<br />
@@ -843,7 +845,9 @@<br />
mov_h r31, r29<br />
mov_l r30, r28<br />
out __RAMPZ__, r20<br />
+ push r20<br />
XCALL __tablejump_elpm__<br />
+ pop r20<br />
.L__do_global_dtors_start:<br />
cpi r28, lo8(__dtors_end)<br />
cpc r29, r17<br />
</pre><br />
<br />
The easiest way to rebuild gcc-avr is using ABS and makepkg.<br />
<br />
=== Missing twi.o ===<br />
<br />
If the file /usr/share/arduino/lib/targets/libraries/Wire/utility/twi.o does not exist arduino may try to create it. Normal users do not have permission to write there so this will fail. Run arduino as root so it can create the file, after the file has been created arduino can be run under a normal user.<br />
<br />
== Bugs ==<br />
<br />
This section is targeted at the package maintainers.<br />
<br />
{| border="1"<br />
! Symptom !! Cause / Upstream bug report !! Patches / Workarounds !! Patched Packages / End-User solutions<br />
|-<br />
| delay() sleeps forever || ??? || [https://wiki.archlinux.org/index.php/Arduino#delay.28.29_function_doesn.27t_work workaround] || none<br />
|-<br />
| progmem error || [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49764 bug in gcc-avr (fixed, but unreleased)] || [http://arduino.cc/forum/index.php/topic,66710.msg491529.html#msg491529 workaround] || [https://aur.archlinux.org/packages.php?ID=50146 aur/gcc-avr-svn] or [https://aur.archlinux.org/packages.php?ID=8388 aur/arduino]<br />
|}<br />
<br />
==See also==<br />
<br />
* http://bbs.archlinux.org/viewtopic.php?pid=295312<br />
* http://regomodoslinux.blogspot.com/2007/10/how-to-install-arduino-ide-in-archlinux.html<br />
* http://gunnewiek.com/2011/open-pde-files-with-arduino-ide-in-linux/<br />
* https://bbs.archlinux.org/viewtopic.php?pid=981348</div>Kardechhttps://wiki.archlinux.org/index.php?title=Arduino&diff=181846Arduino2012-02-03T21:20:26Z<p>Kardech: Cannot modify the file before it exists.</p>
<hr />
<div>[[Category:Development (English)]]<br />
[[Category:Mathematics and science (English)]]<br />
Arduino is an open-source electronics prototyping platform based on flexible, easy-to-use hardware and software. It's intended for artists, designers, hobbyists, and anyone interested in creating interactive objects or environments. More information is availible on the [http://www.arduino.cc/ Arduino HomePage].<br />
<br />
==Installation==<br />
<br />
* Install {{AUR|arduino}} from the [[Arch User Repository|AUR]].<br />
* Add yourself to the {{ic|uucp}} [[Users and Groups|group]]. (More information in the next section: "Accessing serial")<br />
<br />
==Configuration==<br />
<br />
===Accessing serial===<br />
<br />
The arduino board communicates with the PC via a serial connection or a serial over USB connection. So the user needs read/write access to the serial device file. [[Udev]] creates files in /dev/tts/ owned by group uucp so adding the user to the uucp group gives the required read/write access.<br />
<br />
gpasswd -a <user> uucp<br />
<br />
{{Note|You'll have to logout and login again for this to take effect.}}<br />
<br />
Briefly run the arduino command and stop it, then modify ~/.arduino/preferences.txt .<br />
<br />
Change serial port from COM1 to your serial port. You can find out what your serial port is with:<br />
<br />
ls /dev/ | grep "USB"<br />
<br />
This is the line to change in ~/.arduino/preferences.txt:<br />
<br />
serial.port=/dev/ttyUSB0<br />
<br />
==Working with Uno/Mega2560==<br />
<br />
The Arduino Uno and Mega2560 have an onboard USB interface (an Atmel 8U2) that accepts serial data, so they are accessed through /dev/ttyACM0 created by the cdc-acm kernel module when it is plugged in.<br />
<br />
The 8U2 firmware may need an update to ease serial communications. See [http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286350399] for more details and reply #11 for a fix. The original arduino bbs, where you can find an image explaining how to get your Uno into DFU, is now in a read-only state. If you do not have an account to view the image, see [http://www.scribd.com/doc/45913857/Arduino-UNO].<br />
<br />
You can perform a general function test of the Uno by putting it in loopback mode and typing characters into the arduino serial monitor at 115200 baud. It should echo the characters back to you. To put it in loopback, short pins 0 -> 1 on the digital side and either hold the reset button or short the GND -> RESET pins while you type.<br />
<br />
== Running Arduino Uno ==<br />
<br />
Once Arduino is running you must ensure you have selected the correct board from the Tools->Boards menu item:<br />
Arduino Uno<br />
<br />
Secondly you must ensure you have selected the correct serial port from the Tools->Serial Port menu item:<br />
/dev/ttyACM0<br />
<br />
Once these are done you should be able to write and upload sketches to your Arduino Uno without any issues.<br />
<br />
<br />
==Alternatives for IDE==<br />
<br />
===Arduide===<br />
<br />
ArduIDE is a Qt-based IDE for Arduino and is available to [https://aur.archlinux.org/packages.php?ID=39927 download] from aur.<br />
<br />
If you prefer working from terminal, below there are some other options to choose from.<br />
<br />
===Scons===<br />
<br />
Using [http://www.scons.org/ scons] together with [http://code.google.com/p/arscons/ arscons] it is very easy to use to compile and upload Arduino projects from the command line. Scons is based on python and you will need python-pyserial to use the serial interface. Install everything with<br />
<br />
# pacman -S python-pyserial scons<br />
<br />
That will get the dependencies you need too. You will also need Arduino itself so install it as described above. Create project directory (eg. test), then create a arduino project file in your new directory. Use the same name as the directory and add .pde (eg. test.pde). Get the [http://arscons.googlecode.com/git/SConstruct SConstruct] script from arscons and put it in your directory. Have a peek in it and, if necessary, edit it. It's a python script. Edit your project as you please, then run<br />
<br />
$ scons # This will build the project<br />
$ scons upload # This will upload the project to your Arduino<br />
<br />
===Makefile===<br />
Update 2011-03-12. Arduino Is not shipping a Makefile with version (22). The Makefile from the [http://code.google.com/p/dogm128/source/browse/libraries/Dogm/examples/SpaceTrash/Makefile.uno_dogs102 dogm128] project works for me though.<br />
<br />
Instead of using the arduino IDE it's possible to use another editor and a Makefile.<br />
<br />
Set up a directory to program your Arduino and copy the Makefile into this directory. A copy of the Makefile can be obtained from /usr/share/arduino/hardware/cores/arduino/Makefile<br />
<br />
You will have to modify this a little bit to reflect your settings. The makefile should be pretty self explainatory. Here are some lines you may have to edit.<br />
<br />
PORT = usually /dev/ttyUSBx, where x is the usb serial port your arduino is plugged into<br />
TARGET = your sketch's name<br />
ARDUINO = /usr/share/arduino/lib/targets/arduino<br />
<br />
Depending on which library functions you call in your sketch, you may need to compile parts of the library. To do that you need to edit your SRC and CXXSRC to include the required libraries.<br />
<br />
Now you should be able to make && make upload to your board to execute your sketch.<br />
<br />
===Arduino-CMake===<br />
<br />
Using [https://github.com/queezythegreat/arduino-cmake arduino-cmake] and [http://www.cmake.org/cmake/resources/software.html CMake] you can build Arduino firmware from the command line using multiple build systems. CMake lets you generate the build system that fits your needs, using the tools you like. It can generate any type of build system, from simple Makefiles, to complete projects for Eclipse, Visual Studio, XCode, etc.<br />
<br />
Requirements:<br />
* [http://www.archlinux.org/packages/?sort=&q=cmake CMake]<br />
* [https://aur.archlinux.org/packages.php?ID=8388 Arduino SDK]<br />
* [http://www.archlinux.org/packages/?sort=&q=gcc-avr gcc-avr]<br />
* [http://www.archlinux.org/packages/?sort=&q=binutils-avr binutils-avr]<br />
* [http://www.archlinux.org/packages/?sort=&q=avr-libc avr-libc]<br />
* [http://www.archlinux.org/packages/?sort=&q=avrdude avrdude]<br />
<br />
==Troubleshooting==<br />
<br />
===delay() function doesn't work===<br />
There are some cases where the delay() function doesn't work, causing programs such as the example [http://www.arduino.cc/en/Tutorial/Blink Blink] to malfunction. <br />
It appears that the Arch compiler sometimes generates code that writes to addresses before the start of memory. RAM starts at address 0x200 on the mega, but the Blink code has the delay() timer variables located at 0x100-0x10b. This only seems to happen when the code contains no initialized global variables (.data segment in asm-speak) - the linker is told that the data segment starts at 0x200, but if there's nothing to go in it it generates an incorrect start address for the uninitialized global variables (.bss segment). Since the timer variables are uninitialized globals (or globals initialized to zero) they end up at an illegal address.<br />
<br />
There are currently two ways to bypass this issue.<br />
<br />
* Use '''Serial.begin(9600);''' in '''setup()''' function. [[http://forums.adafruit.com/viewtopic.php?f=25&t=21075 Source post]] <br />
<br />
<pre><br />
/*<br />
Blink<br />
Turns on an LED on for one second, then off for one second, repeatedly.<br />
<br />
This example code is in the public domain.<br />
*/<br />
<br />
void setup() { <br />
// initialize the digital pin as an output.<br />
// Pin 13 has an LED connected on most Arduino boards:<br />
pinMode(13, OUTPUT); <br />
Serial.begin(9600);<br />
}<br />
<br />
void loop() {<br />
digitalWrite(13, HIGH); // set the LED on<br />
delay(1000); // wait for a second<br />
digitalWrite(13, LOW); // set the LED off<br />
delay(1000); // wait for a second<br />
}<br />
</pre><br />
<br />
* Use an initialized global variable. [[http://arduino.cc/forum/index.php/topic,49900.msg363688.html#msg363688 Source post]]<br />
<br />
<pre><br />
char dummyvariablecuzmaintainerborkedthecompiler = 123; // force something into the .data segment with non-zero initializer<br />
/*<br />
Blink<br />
Turns on an LED on for one second, then off for one second, repeatedly.<br />
<br />
This example code is in the public domain.<br />
*/<br />
<br />
void setup() { <br />
dummyvariablecuzmaintainerborkedthecompiler++; // stops the linker from removing the global variable<br />
<br />
// initialize the digital pin as an output.<br />
// Pin 13 has an LED connected on most Arduino boards:<br />
pinMode(13, OUTPUT); <br />
}<br />
<br />
void loop() {<br />
digitalWrite(13, HIGH); // set the LED on<br />
delay(1000); // wait for a second<br />
digitalWrite(13, LOW); // set the LED off<br />
delay(1000); // wait for a second<br />
}</pre><br />
<br />
Related pages:<br />
* http://arduino.cc/forum/index.php/topic,56841.0.html<br />
* http://arduino.cc/forum/index.php/topic,49900.0.html<br />
* http://arduino.cc/forum/index.php?topic=59409.0.html<br />
<br />
Fedora has the same problem with binutils 2.21 ([https://bugzilla.redhat.com/show_bug.cgi?id=688645 bug report]).<br />
Downgraded packages that work are binutils-avr 2.20.1-3 and gcc-avr 4.5.1-2. <br />
There is also an upstream bug report [http://sourceware.org/bugzilla/show_bug.cgi?id=12757 here] but no one has replied yet.<br />
<br />
=== Error opening serial port ===<br />
You may see the serial port initially when the IDE starts, but the TX/RX leds do nothing when uploading. You may have previously changed the baudrate in the serial monitor to something it doesn't like. Edit ~/.arduino/preferences.txt so that serial.debug_rate is a different speed, like 115200.<br />
<br />
=== Arduino Mega2560 and new gcc-avr ===<br />
<br />
If you are using gcc-avr >= 4.3.5 then there is a C++ bug in the gcc-avr toolchain which builds bad firmware for the Atmel2560 processors. gcc-avr must be rebuilt using a patch found at [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45263]. You can read more about the problems at [http://andybrown.me.uk/ws/2010/10/24/the-major-global-constructor-bug-in-avr-gcc/].<br />
<br />
Here is the patch for gcc:<br />
<pre><br />
--- gcc-4.5.1.orig/gcc/config/avr/libgcc.S 2009-05-23 17:16:07 +1000<br />
+++ gcc-4.5.1/gcc/config/avr/libgcc.S 2010-08-12 09:38:05 +1000<br />
@@ -802,7 +802,9 @@<br />
mov_h r31, r29<br />
mov_l r30, r28<br />
out __RAMPZ__, r20<br />
+ push r20<br />
XCALL __tablejump_elpm__<br />
+ pop r20<br />
.L__do_global_ctors_start:<br />
cpi r28, lo8(__ctors_start)<br />
cpc r29, r17<br />
@@ -843,7 +845,9 @@<br />
mov_h r31, r29<br />
mov_l r30, r28<br />
out __RAMPZ__, r20<br />
+ push r20<br />
XCALL __tablejump_elpm__<br />
+ pop r20<br />
.L__do_global_dtors_start:<br />
cpi r28, lo8(__dtors_end)<br />
cpc r29, r17<br />
</pre><br />
<br />
The easiest way to rebuild gcc-avr is using ABS and makepkg.<br />
<br />
=== Missing twi.o ===<br />
<br />
If the file /usr/share/arduino/lib/targets/libraries/Wire/utility/twi.o does not exist arduino may try to create it. Normal users do not have permission to write there so this will fail. Run arduino as root so it can create the file, after the file has been created arduino can be run under a normal user.<br />
<br />
== Bugs ==<br />
<br />
This section is targeted at the package maintainers.<br />
<br />
{| border="1"<br />
! Symptom !! Cause / Upstream bug report !! Patches / Workarounds !! Patched Packages / End-User solutions<br />
|-<br />
| delay() sleeps forever || ??? || [https://wiki.archlinux.org/index.php/Arduino#delay.28.29_function_doesn.27t_work workaround] || none<br />
|-<br />
| progmem error || [http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49764 bug in gcc-avr (fixed, but unreleased)] || [http://arduino.cc/forum/index.php/topic,66710.msg491529.html#msg491529 workaround] || [https://aur.archlinux.org/packages.php?ID=50146 aur/gcc-avr-svn] or [https://aur.archlinux.org/packages.php?ID=8388 aur/arduino]<br />
|}<br />
<br />
==See also==<br />
<br />
* http://bbs.archlinux.org/viewtopic.php?pid=295312<br />
* http://regomodoslinux.blogspot.com/2007/10/how-to-install-arduino-ide-in-archlinux.html<br />
* http://gunnewiek.com/2011/open-pde-files-with-arduino-ide-in-linux/<br />
* https://bbs.archlinux.org/viewtopic.php?pid=981348</div>Kardech