[arch-general] arduino mega2560 and gcc-avr
I'm trying to use my arduino mega2560 with arch but there's no way to get it working yet.. I installed the arduino 1.0.1-1, and everything seems to work, until I try to use the Serial, when I get (compiling from gnoduino): avr:5 architecture of input file `/tmp/build1342512569.47XizyI/core.a(HardwareSerial.cpp.o)' is incompatible with avr:6 output collect2: error: ld returned 1 exit status I saw about a bug in avr-gcc but it should have been fixed long time ago, and it's probably not the same thing... Anyone got it working?
When you say Serial, do you mean USB or RS232? I have not used gnoduino, but with had no problem compiling and uploading to Arduino Mega2560 over USB on Arch using avr-gccand avrdude. This is the avrdude settings I use: avrdude -c stk500v2 -p atmega2560 -b 115200 -P /dev/ttyACM0 -U flash:w:program-file.hex (You will need the root privileges for this). Attached the makefile if it helps you to get an idea. Sudaraka Wijesinghe On 07/17/2012 01:43 PM, andrea crotti wrote:
I'm trying to use my arduino mega2560 with arch but there's no way to get it working yet.. I installed the arduino 1.0.1-1, and everything seems to work, until I try to use the Serial, when I get (compiling from gnoduino):
avr:5 architecture of input file `/tmp/build1342512569.47XizyI/core.a(HardwareSerial.cpp.o)' is incompatible with avr:6 output collect2: error: ld returned 1 exit status
I saw about a bug in avr-gcc but it should have been fixed long time ago, and it's probably not the same thing... Anyone got it working?
Hi, Am 17.07.2012 20:57, schrieb Sudaraka Wijesinghe:
This is the avrdude settings I use:
Actually this has nothing to do with avrdude. avrdude is used to program AVR devices. He got issues with avr-gcc, so basically there is nothing to upload. Furthermore I think the Arduino IDE does take care of uploading and issues like this.
avrdude -c stk500v2 -p atmega2560 -b 115200 -P /dev/ttyACM0 -U flash:w:program-file.hex (You will need the root privileges for this).
This can (and to my opinion should) be changed, so you don't need to be root. See [1] for some examples for various programmers. First of all you should try to use the upstream package, which can be downloaded here [2]. It already contains the necessary tool chain (including avr-gcc and/or avr-g++), so it probably should work just fine. If it does function, you can then look into the reason why your setup doesn't work. Best regards, Karol Babioch [1] https://wiki.archlinux.org/index.php/Udev#Accessing_Firmware_Programmers_and... [2] http://arduino.cc/en/Main/Software
2012/7/17 Karol Babioch <karol@babioch.de>:
This can (and to my opinion should) be changed, so you don't need to be root. See [1] for some examples for various programmers.
First of all you should try to use the upstream package, which can be downloaded here [2]. It already contains the necessary tool chain (including avr-gcc and/or avr-g++), so it probably should work just fine. If it does function, you can then look into the reason why your setup doesn't work.
Best regards, Karol Babioch
[1] https://wiki.archlinux.org/index.php/Udev#Accessing_Firmware_Programmers_and... [2] http://arduino.cc/en/Main/Software
So I am actually using the default arduino installation, and the curious thing is that if I write a program which does something with the leds everything compiles and runs perfectly. But if I try to use the Serial object (for example Serial.begin(9600);), it stops to compile. I tried both with "ino" and gnoduino, but I don't think is a problem of the tool..
Anyway problem solved downgrading avr glibc to 1.7..
participants (3)
-
andrea crotti
-
Karol Babioch
-
Sudaraka Wijesinghe