Open soonahn opened 10 years ago
After exploration into the Arduino build chain (which builds just fine, just can't upload). Here's their output
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /tmp/build6757626990165919744.tmp/crush.cpp -o /tmp/build6757626990165919744.tmp/crush.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring_analog.c -o /tmp/build6757626990165919744.tmp/wiring_analog.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring_pulse.c -o /tmp/build6757626990165919744.tmp/wiring_pulse.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring.c -o /tmp/build6757626990165919744.tmp/wiring.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring_shift.c -o /tmp/build6757626990165919744.tmp/wiring_shift.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/wiring_digital.c -o /tmp/build6757626990165919744.tmp/wiring_digital.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/WInterrupts.c -o /tmp/build6757626990165919744.tmp/WInterrupts.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -c -g -Os -w -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/hooks.c -o /tmp/build6757626990165919744.tmp/hooks.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial.cpp -o /tmp/build6757626990165919744.tmp/HardwareSerial.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/WString.cpp -o /tmp/build6757626990165919744.tmp/WString.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/USBCore.cpp -o /tmp/build6757626990165919744.tmp/USBCore.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/WMath.cpp -o /tmp/build6757626990165919744.tmp/WMath.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/CDC.cpp -o /tmp/build6757626990165919744.tmp/CDC.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial3.cpp -o /tmp/build6757626990165919744.tmp/HardwareSerial3.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/Stream.cpp -o /tmp/build6757626990165919744.tmp/Stream.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/IPAddress.cpp -o /tmp/build6757626990165919744.tmp/IPAddress.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/HID.cpp -o /tmp/build6757626990165919744.tmp/HID.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/main.cpp -o /tmp/build6757626990165919744.tmp/main.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/new.cpp -o /tmp/build6757626990165919744.tmp/new.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/Tone.cpp -o /tmp/build6757626990165919744.tmp/Tone.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial1.cpp -o /tmp/build6757626990165919744.tmp/HardwareSerial1.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/Print.cpp -o /tmp/build6757626990165919744.tmp/Print.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial2.cpp -o /tmp/build6757626990165919744.tmp/HardwareSerial2.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=157 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I/usr/share/arduino/hardware/arduino/avr/cores/arduino -I/usr/share/arduino/hardware/arduino/avr/variants/standard /usr/share/arduino/hardware/arduino/avr/cores/arduino/HardwareSerial0.cpp -o /tmp/build6757626990165919744.tmp/HardwareSerial0.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/wiring_analog.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/wiring_pulse.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/wiring.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/wiring_shift.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/wiring_digital.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/WInterrupts.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/hooks.c.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/HardwareSerial.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/WString.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/USBCore.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/WMath.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/CDC.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/HardwareSerial3.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/Stream.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/IPAddress.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/HID.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/main.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/new.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/Tone.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/HardwareSerial1.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/Print.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/HardwareSerial2.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-ar rcs /tmp/build6757626990165919744.tmp/core.a /tmp/build6757626990165919744.tmp/HardwareSerial0.cpp.o
/usr/share/arduino/hardware/tools/avr/bin/avr-gcc -w -Os -Wl,--gc-sections -mmcu=atmega328p -o /tmp/build6757626990165919744.tmp/crush.cpp.elf /tmp/build6757626990165919744.tmp/crush.cpp.o /tmp/build6757626990165919744.tmp/core.a -L/tmp/build6757626990165919744.tmp -lm
/usr/share/arduino/hardware/tools/avr/bin/avr-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/build6757626990165919744.tmp/crush.cpp.elf /tmp/build6757626990165919744.tmp/crush.cpp.eep
/usr/share/arduino/hardware/tools/avr/bin/avr-objcopy -O ihex -R .eeprom /tmp/build6757626990165919744.tmp/crush.cpp.elf /tmp/build6757626990165919744.tmp/crush.cpp.hex
Sketch uses 1,418 bytes (4%) of program storage space. Maximum is 32,256 bytes.
Global variables use 87 bytes (4%) of dynamic memory, leaving 1,961 bytes for local variables. Maximum is 2,048 bytes.
So... any ideas anyone? Why is ino insisting on using avr-gcc when the Arduino toolchain is clearly not.
So, I've abandoned Ino for now. I don't have enough time to keep trying to get it to use the correct toolchain for the Due.
I've copied the script above and made it an executable, changing the last two commands so it outputs into .build of the local folder, and then using Ino to upload the file
cant believe i still have the same problem, one year later....
@larsemil one thing I forgot to post was the output of the strace I did.
I saw that the search path for Ino was looking into /usr/var before /usr/share. Perhaps some clever symlinking would fix the issue?
I can't seem to compile Arduino projects for the Due
I keep getting.
avr-gcc: error: unrecognized argument in option '-mmcu=cortex-m3'
I'm running on a Arch Linux machine. I've even tried the custom fork of @justonia which didn't seem to help.
I reverted back to Arduino 1.5.x instead of their nightly build as well.
I've attempted to patch Ino myself, to no avail. I've taken Arduino down to the bare bones and gotten no where. This is confusing because 3 weeks ago this was working beautifully for me. Then I foolishly upgraded and everything seemed to break. If anyone can send me in the right direction I'd be super grateful.