#avr | Logs for 2016-05-07

Back
[07:13:07] <Duality> hi
[07:13:57] <Duality> i am trying to compile some code for the atmega2560 and it is complaining that the object files aren't the right architecture
[07:15:09] <sabor> you might have some .o file which have been compiled for a different MCU and need to be recompiled for m2560
[07:16:13] <Duality> here is what the build output looks like: http://pastebin.com/ShAMGwBH
[07:16:34] <Duality> which also show the compile and link commands
[07:16:38] <Duality> shows
[07:16:59] <Duality> it compiles with atmega8 or atmega328p but not for the atmega2560
[07:17:34] <sabor> the link line does not specify the MCU
[07:18:00] <sabor> try avr-g++ -o build/main.elf build/src/main.o -mmcu=atmega2560
[07:18:29] <Duality> ow yea it build it :D
[07:18:51] <sabor> :)
[07:19:22] <Duality> normally i compile stuff for my pc and then there is no -mcu option :D
[07:19:47] <Lambda_Aurigae> because you aren't cross compiling
[07:19:57] <sabor> yeah, or it's not as important as for the avr
[07:21:17] <Lambda_Aurigae> it is possible to actually compile for intel or amd or various other processors with -mtune which is similar but different.
[07:21:32] <Lambda_Aurigae> but it amounts to the same thing.
[10:34:26] <Jartza> hallo
[10:38:03] <twnqx> there's also 32bit cross compiling on 64bit x86_64 :)