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?
> 

# Makefile: Arduino Atmega328p

# Program
PROG = 01

# Device
MCU = atmega2560
F_CPU = 16000000UL

# Connection
USB = ttyACM0
#BAUD_RATE = 57600
BAUD_RATE = 115200

# Compiler
CC = avr-gcc
CFLAGS = -Wall -mmcu=$(MCU) -DF_CPU=$(F_CPU)

# Linker
OBJCPY = avr-objcopy
OBJCPYFLAGS = -O ihex -R .eeprom

# Loader
LOADER = sudo avrdude
#LOADERFLAGS = -c arduino -p $(MCU) -b $(BAUD_RATE) -P /dev/$(USB)
LOADERFLAGS = -c stk500v2 -p $(MCU) -b $(BAUD_RATE) -P /dev/$(USB)


all: $(PROG).hex
        $(LOADER) $(LOADERFLAGS) -U flash:w:$<


%.hex: %.o
        $(OBJCPY) $(OBJCPYFLAGS) $< $@


.c.o:
        $(CC) $(CFLAGS) -o $*.o $<

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to