New Atmel toolchain 3.5.0 available, featuring gcc 4.9.2 and avrdude 6.1

116 views
Skip to first unread message

Federico Fissore

unread,
Oct 7, 2015, 3:33:25 AM10/7/15
to devel...@arduino.cc
Hi all

I've just published a test AVR core 9.6.8 with gcc 4.9.2 and avrdude 6.1

You can test it by adding this url to Boards Manager pref
http://downloads.arduino.cc/packages/package_3.5.0_index.json

I've compiled three random sketches: Blink, GSM->ReceiveVoiceCall and
Bridge->Bridge

Results are not encouraging. New toolchain makes sketches slightly
bigger: from ~2% bigger for Bridge and GSM to ~11% bigger for Blink. See
attachment

Andrew, you opened this issue [1] an year ago: may you give this
toolchain a spin and see if it, at least, fixes it?

Regards

Federico

[1] https://github.com/arduino/Arduino/issues/2413
from-3.4.5-to-3.5.0.txt

Andrew Kroll

unread,
Oct 7, 2015, 3:43:10 AM10/7/15
to devel...@arduino.cc

I'll be able to test sometime today, and I'll let you know.

--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.

Federico Fissore

unread,
Oct 7, 2015, 3:43:15 AM10/7/15
to devel...@arduino.cc
Andrew Kroll ha scritto il 07/10/2015 alle 09:42:
> I'll be able to test sometime today, and I'll let you know.
>

Thank you in advance :)

Federico

Mikael Patel

unread,
Oct 7, 2015, 7:27:48 AM10/7/15
to Developers
Nice work!

Does this include the LTO plugin? I would like to test it with the Cosa build script (which uses LTO). There seems to be changes to the ar(chive) handling of LTO compiled files. I guess that a new setup is needed.

Cheers! Mikael

Federico Fissore

unread,
Oct 7, 2015, 7:36:38 AM10/7/15
to devel...@arduino.cc

I'm not expert with LTO, but LTO.so file is included with GCC
Btw, this is true for current toolchain as well

Federico

Mikael Patel

unread,
Oct 7, 2015, 10:58:56 AM10/7/15
to devel...@arduino.cc
Thanks! I found the issue in my build script; 1) option -fuse-linker-plugin needed for the linker, 2) avr-ar should be avr-gcc-ar (to pass necessary LTO plugin info). The results for Cosa looks very promising. Compared to AVR-GCC-4.8.1 with LTO enabled it uses less SRAM and PROGMEM. I will get back with more details. Cheers!

Mikael Patel

unread,
Oct 7, 2015, 5:02:40 PM10/7/15
to Developers
Found one issue when building for ATtiny85. The power reduction management register functions, e.g. power_timer0_enable(), generate a linker error (LTO). Below is the very cryptic error message.

/tmp/ccRaqJQG.s: Assembler messages:
/tmp/ccRaqJQG.s:829: Error: number must be positive and less than 32

Cheers!


Den onsdag 7 oktober 2015 kl. 09:33:25 UTC+2 skrev f.fissore:

Andrew Kroll

unread,
Oct 7, 2015, 6:45:03 PM10/7/15
to devel...@arduino.cc
Still fails. :-(

In file included from /root/Arduino/libraries/UHS_FS/UHS_FS.h:146:0,
                 from UHS_FS_NEW_DEMO.ino:165:
/root/Arduino/libraries/UHS_FS/FAT/FatFS/src/ff.c: In function 'FRESULT f_write(FIL*, const void*, UINT, UINT*)':
/root/Arduino/libraries/UHS_FS/FAT/FatFS/src/ff.c:2883:1: error: unable to find a register to spill in class 'POINTER_REGS'
 }
 ^
/root/Arduino/libraries/UHS_FS/FAT/FatFS/src/ff.c:2883:1: error: this is the insn:
(insn 202 201 203 32 (set (reg:HI 26 r26)
        (reg/f:HI 194)) /root/Arduino/libraries/UHS_FS/FAT/FatFS/src/ff.c:2840 83 {*movhi}
     (nil))
/root/Arduino/libraries/UHS_FS/FAT/FatFS/src/ff.c:2883: confused by earlier errors, bailing out


--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developers+...@arduino.cc.



--
Visit my github for awesome Arduino code @ https://github.com/xxxajk

Andrew Kroll

unread,
Oct 7, 2015, 6:50:07 PM10/7/15
to devel...@arduino.cc
Oh and yeah, here's your example code to make it fail:
https://github.com/felis/UHS30
examples -> UHS_FS -> USB_HOST_SHIELD -> UHS_FS_NEW_DEMO

I can fix this by tagging the compiler version as bad (see report and sources for my fix) but it would be best to simply nail this bug.

Federico Fissore

unread,
Nov 5, 2015, 7:02:34 AM11/5/15
to devel...@arduino.cc
I've received an email from Atmel, notifying me that the toolchain was
updated

"One of the fixes is to address 'out of range' error reported in
following forums.
https://groups.google.com/a/arduino.cc/forum/m/#!topic/developers/ATDTccou4cM
http://www.avrfreaks.net/forum/operand-out-range-error-when-using-prr"

I've updated the json file for boards manager, which will now download
gcc 4.9.2-arduino2 and avrdude 6-1-arduino2

Regards

Federico
Reply all
Reply to author
Forward
0 new messages