Pages: [1]   Go Down
Author Topic: avr-gcc 4.7.2  (Read 6392 times)
0 Members and 1 Guest are viewing this topic.
Pistestii din Deal
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino project collection rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It seems that avr-gcc 4.7.2 version is the greatest for avr's. When will Arduino IDE migrate to it? The sooner, the better!

Vasi
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26378
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the Arduino IDE using now? Just curious.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Gosport, UK
Offline Offline
Faraday Member
**
Karma: 21
Posts: 3113
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

On my Mac, I get
Code:
:avr-gcc -v
Using built-in specs.
...
gcc version 4.3.2 (GCC)
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 518
Posts: 26378
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

What does 4.7.2 offer as enhancements? Not being much of a programmer or much of a library user, I'm content with the IDE as is.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pistestii din Deal
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino project collection rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Smaller code. Also it comes with a lot of bug-fixes. Maybe is not so obvious for the few avr's used by Arduino language but, considering that the trend is to extend to other microcontrollers, then 4.7.2 will be better. And for many, Arduino is supposed to be a launch pad to AVR's world and "raw" C/C++ programing. Is good to have a correlation.

I'm always for the better version of gcc compiler (and for "shrinking the projects"  smiley-razz ).
« Last Edit: October 03, 2012, 02:01:08 pm by funlw65 » Logged

Offline Offline
Sr. Member
****
Karma: 4
Posts: 327
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

have you looked at this

http://arduino.cc/forum/index.php/topic,118440.0.html

Logged

Pistestii din Deal
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino project collection rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Didn't, thanks for the link. Actually, I'm using Arduino IDE only occasionally. I use Eclipse with avr-gcc 4.7.0 on Linux Debian Testing (not yet 4.7.2 in a linux distribution to my knowledge) and with avr-gcc 4.7.2 (thanks to Georg-Johann Lay ) under Vista. 
Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6637
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This was my response to a similar message on the developers list, recently:

Quote
I can't speak for the Arduino team, but note that the Arduino IDE does not include "gcc" directly; instead, it's based on the "packaged" development environments (WinAVR for windows, AVR Crosspack for Mac, I think.)  So to go to 4.7, we probably need the following to happen first:

1) Atmel goes to 4.7 for AVR Studio (AVR Studio 6 has 4.6.2, for reasons that aren't clear.)
2) "someone" puts together a WINAVR-like for Windows (non-AVR Studio) (hopefully with the same versions of binutils/avr-libc/gcc as AVR Studio)
3) "someone" puts together a similar package for Mac.
4) The Arduino team changes, tests, and becomes satisfied that the Arduino core works with the new compiler (those named memory spaces may sound good, but I think they're significantly incompatible with the way PROGMEM is currently used in the Arduino core.)

(meanwhile, the linux distributions have been throwing together avr-gcc packages somewhat randomly, and frequently in ways that apparently don't work very well.  Watching the Arduino project has made me appreciate the effort that goes into putting together "tool packages", a lot more than I used to.  Especially since it's not getting done :-( (WINAVR and AVR Crosspack are both quite old.))

Note that many of the intermediate versions between 4.3.2 and 4.7 have "known problems" WRT AVR and/or arduino.  That hasn't helped, either.

Note that the gcc that Atmel is shipping with their AtmelStudio is only at 4.6.something...
One of the changes in 4.7 is "named address spaces" that will, in theory, greatly simply storing constants in program memory.  In reality, it may also break the current Arduino core code that uses <pgmspace.h>
Logged

Pistestii din Deal
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino project collection rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you for the info.

1) So, the first move is expected from Atmel... I think that will take a little longer than expected...
2) This has been done. MHTools, but it needs to be updated with Georg-Johann Lay's package.
3) The 4.7.2 version is fresh, not yet an OS X version... I think...
4) I think I saw somewhere on Internet a tutorial about migrating to gcc 4.7 (including core changes) ... I have to search for the link again (I started to use Arduino 1.0.1 with gcc 4.7.0)... found it

If Atmel is excluded, then maybe the migration to 4.7 will happen sooner? Well, I forgot that also Linux must be able to "deliver" 4.7.2 in the most important distros (but I've seen Arduino for Linux packaged with his own version)... Fedora will have it at version 18.

This is a post I'm watching on avrfreaks.net
« Last Edit: October 03, 2012, 07:28:34 pm by funlw65 » Logged

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 124
Posts: 6637
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hmm.  None of those repositories/tutorials are at 4.7.2, yet.  How "aggressive" do you think Arduino should be able chasing what could be a moving target?  The reason for using a WINAVR/CrossPack style of package isn't just convenience; usually those are pretty stable releases, as well.  (The Arduino IDE has had one release in the last year, right?  1.0 came out a little over a year ago, and 1.0.1 came out "recently.")
Logged

Pistestii din Deal
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino project collection rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Don't know how aggressive... maybe not at all. But as long as I am aware of a better avr-gcc compiler than the current one, then I'm starting to complain, making requests, and in the end, making the switch. It doesn't need to be exactly 4.7.2, but right now, 4.8 produce bigger code and incorrect in some cases.

Regarding to frequency of changes, if 4.7.2 proves to be better and stable (until now, it does), then I want the switch and, until 4.8 proves to be better, it can stay there for years.
Logged

Ayer, Massachusetts, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1832
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Note that the gcc that Atmel is shipping with their AtmelStudio is only at 4.6.something...
One of the changes in 4.7 is "named address spaces" that will, in theory, greatly simply storing constants in program memory.  In reality, it may also break the current Arduino core code that uses <pgmspace.h>
In theory it shouldn't if pgmspace.h uses the appropriate #ifdef's to use the named address support in 4.7.

As one of the authors of the GCC infrastructure support for named address spaces, it is good to see it being used by other ports than the one I originally wrote it for (CELL).
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

MHV AVR Tools 20121007 includes GCC 4.7.2.
http://www.makehackvoid.com/mhvavrtools-20121007

Win32, Linux x86 & Linux x64 packages are available now, OSX is still cooking.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 18
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

MHV AVR Tool 20121007 for OSX is now available too.
Logged

Pistestii din Deal
Offline Offline
Newbie
*
Karma: 0
Posts: 36
Arduino project collection rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you DSilva, you're fantastic! The 2) and 3)are accomplished. Now it should be easy for Arduino team to move the core to it. The Atmel will follow us soon after that smiley-wink

Vasi

P.S. Maybe they (Atmel) will reconsider and switch to Eclipse IDE to cover all the operating systems (and that will be a smart move). Microchip is using NetBeans IDE for their MPLAB X and they are doing a great job (in both the IDE and C compilers which are now cross platform). It would be pitty for Atmel to consider that engineers are tided only on Windows world. Anyway, this is another discussion - let's do things step by step.
« Last Edit: October 10, 2012, 08:48:00 am by funlw65 » Logged

Pages: [1]   Go Up
Jump to: