There is still the issue of coming up with parallel versions for Windows/Mac/Linux...
WestfW
Just a clarification….
Previous efforts haven’t been ignored but every time the request was brought up there were always multiple issues with more modern compilers that made it impossible.
Upgranding the toolchain has been requested a number of time and we would love to be able to do it.
--
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.
What I get from thisAn Arduino compatible shield that uses one of the serial ports must include in the library a check for every board they want to attach to. Currently that's over 20 boards in 1.5.5-r2. This also would mean every time a new board is designed or announced, the library would have to be modified to support that board unless the board is called the same as a previous board.
One of the primary draw for users of Arduino related hardware/Software is the ease of use to the novice programmer.Since I see new clone boards all the time that use different names than Arduino provides, this seems like a significant burden to the novice user that will not be able to figure out why a year old LCD driver does not work out of the box.There has to be a better way.
4.8.0 up to 4.8.2 have a bug in code produced.
GCC Bugzilla ref Id of 60486 has fuller details
I've patched and compiled my own 4.8.2 for 32bit Linux and windows. I don't have compiled binaries for Mac tho.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAlM9L9QACgkQz0nQ5oovr7wSKACggdgvD1SUiwxixuiFWjWMKwin
fbQAn20+LwGUp/pFG6WY/PC3HnwLFTuE
=xzvA
-----END PGP SIGNATURE-----
--
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.
thanks Paul!hopefully this new gcc will solve a lot of the outstanding issues people have been having :)m
I'll re-run those tests and several more later this week....
On 04/07/2014 02:29 AM, Cristian Maglie wrote:
> Hi Paul,
>
> In data domenica 6 aprile 2014 21:32:55, Paul Stoffregen ha scritto:
>> Did you see the 6 tests I ran last Thursday (April 3)?
> Yes, really appreciated!
>
>> If I'd known you were about to apply another patch, I would have waited
>> a few days.
> You're right, sorry about that, we didn't mean to waste your time. Timings was
> a bit unlucky and, of course, we always have room for improvements in
> communicating what's going on.
>
> C
>
--
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+unsubscribe@arduino.cc.
Hi everyone
We've just released a nightly that includes the latest toolchain from atmel
http://downloads.arduino.cc/arduino-avr-toolchain-nightly-gcc-4.8.1-windows.zip
http://downloads.arduino.cc/arduino-avr-toolchain-nightly-gcc-4.8.1-macosx.zip
http://downloads.arduino.cc/arduino-avr-toolchain-nightly-gcc-4.8.1-linux32.tgz
http://downloads.arduino.cc/arduino-avr-toolchain-nightly-gcc-4.8.1-linux64.tgz
I must admin I've barely tested it: I've successfully uploaded a Blink
and an ASCIITable on both a Leonardo and an Uno.
Code to build the toolchain on linux32, linux64, mac32 and windows is
available on the atmel-3.4.3 branch at
https://github.com/arduino/toolchain-avr/
It downloads gcc/avr-libc/binutils from gnu and patches it with a patch
we've produced comparing the two source trees
Looking forward for your feedback
Best regards
Federico
Paul Stoffregen, il 03/02/2014 17:40, ha scritto:
>
>> Atmel released a precompiled version here:
>>
>> Windows: http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORWINDOWS.aspx
>> Linux: http://www.atmel.com/tools/ATMELAVRTOOLCHAINFORLINUX.aspx
>>
>> Federico F. is working on the build script for mac (and the other OSs
>> too). If
>> everything goes well, we'll probably have a nightly-build for testing
>> in a day
>> or two.
>
> Great. I'll hold out a couple days, for a download that doesn't require
> a myAtmel account....
>
So, you're saying that LTO in this way allows generating better code,
even when users aren't using the "const" keyword as consistent as they
could/should do, hence it can be an efficiency gain for novice
programmers.
Note that this also involves passing -fwhole-program, perhaps doing lto
without -fwhole-program can still provide some of the lto benefits,
without breaking the build. Or perhaps avr-gcc 4.8 includes the linker
plugin, since I tested with 4.7.
More detailed analysis (and also the issue to track lto support) is at
https://github.com/arduino/Arduino/issues/660
Ralph suggests that he has used an actual Blink sketch with the Arduino
code, so perhaps he has found a way around this? Or perhaps he is using
avr-gcc directly and skips the core.a step, including the core .o file
directly in the build?
With -Os the compiler will not inline as much as previously. To solve
this I used the function __attribute__((always_inline)) which has the
side-effect that the Cosa Pin operations became even faster.
Hey Ralph,
Although I have tested avr-gcc 4.8 (MingW and Linux-x64), the blink sketch test was done with the Arduino 4.8.1 nightly (screen shot attached). I didn't use -fwhole-program; the gnu docs say, "WHOPR stands for WHOle Program optimizeR (not to be confused with the semantics of -fwhole-program)" The only thing I changed was platform.txt to add -flto. The flags lines changed are: compiler.c, .c.elf, .cpp, and .ldflags.
cygwin warning:
MS-DOS style path detected: G:\arduino-avr-toolchain-nightly-gcc-4.8.1\hardware\arduino\avr\cores\arduino\avr-libc\malloc.c
Preferred POSIX equivalent is: /arduino-avr-toolchain-nightly-gcc-4.8.1/hardware/arduino/avr/cores/arduino/avr-libc/malloc.c
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
> an email to developers+unsubscribe@arduino.cc
> <mailto:developers+unsub...@arduino.cc>.
In function '__vector_16':
D:\arduino-avr-toolchain-nightly-gcc-4.8.1\hardware\arduino\avr\cores\arduino\wiring.c:47:1: warning: '_vector_16' appears to be a misspelled signal handler [enabled by default]
ISR(TIMER0_OVF_vect)
^
> an email to developers+unsubscribe@arduino.cc
> <mailto:developers+unsub...@arduino.cc>.
I'm puzzled by the difference between
OutputPin::write(D8, val)
and
digitalWrite(D8, val)
If I understand it correctly they should do the same thing and the
difference should be just this "if"
https://github.com/mikaelpatel/Cosa/blob/master/examples/Benchmarks/CosaBenchmarkPins/CosaBenchmarkPins.ino#L67
Can it alone make digitalWrite ten times slower?
Sketch uses 13,942 bytes (5%) of program storage space. Maximum is 258,048 bytes.Global variables use 565 bytes (6%) of dynamic memory, leaving 7,627 bytes for local variables. Maximum is 8,192 bytes.
Sketch uses 73,730 bytes (28%) of program storage space. Maximum is 258,048 bytes.Global variables use 734 bytes (8%) of dynamic memory, leaving 7,458 bytes for local variables. Maximum is 8,192 bytes.
Hey Ralph,
> I figured out why a lot of unused code is included in the build.
Ah, was it established that the bigger code size was because of unused
code? I had assumed it was due to less efficient optimization, but this
is easier to debug I think :-)
> I previously noticed the linker would only exclude unused functions when
> they are included in an archive. Running avr-gcc foo.o bar.o -o main.elf
> will include the code from bar.o even when bar.o (containing main) does not
> reference anything in bar.o.
Your probably meant "foo.o (containing main)" there?
As for archives - indeed, the linker only takes compilation units from
an archive that it actually needs, unlike .o files directly specified
which are unconditionally included in the build.
However, after selecting the compilation units to include in the build
the gc-sections option combined with -ffunction-sections and
-fdatasections should make sure that any functions or variables that end
up not being used, should be removed from the build again. So perhaps
lto somehow prevents that mechanism from working properly?
Hey Ralph,
> When using an archive only the required .o's are extracted and linked
> (and hopefully only the required symbols from those .o's and not the
> whole .o)
I think the entire .o files are used - not just the required symbols
(this is why C libraries often have one function per .c file). We
actually use this in the Arduino core - when including
HardwareSerial1.cpp, you also get the corresponding ISR in the link even
though it's not referenced.
> > As for archives - indeed, the linker only takes compilation units from
> > an archive that it actually needs, unlike .o files directly specified
> > which are unconditionally included in the build.
> >
> > However, after selecting the compilation units to include in the build
> > the gc-sections option combined with -ffunction-sections and
> > -fdatasections should make sure that any functions or variables that end
> > up not being used, should be removed from the build again. So perhaps
> > lto somehow prevents that mechanism from working properly?
> >
>
> I agree. I suspect (but haven't gone through the gcc source to confirm)
> that lto and -f.*-sections are mutually exclusive, since lto does
> everything -f.*-sections does and more.
Well, apparently it doesn't ;-)
But indeed, it sounds like -flto should be able to throw away unused
functions by itself already, provided that it is really seeing the
entire program. Two things that might be worth checking:
- Is there really a linker plugin active, that allows looking inside .a
files for lto info and symbol references?
- Do all .o and .a files actuall contain LTO bytecode?
A somewhat unrelated note, I just read this in the gcc 4.9.0 manpage:
Link-time optimization does not work well with generation of
debugging information. Combining -flto with -g is currently
experimental and expected to produce wrong results.
So if we add -flto, we should probably remove -g, even though it doesn't
seem to be the cause of our current problem (as tested by you).
- Do all .o and .a files actuall contain LTO bytecode?
--
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.