For Gentoo-Linux there is still only avr-gcc 3.4.6 available, while avr-gcc 4.1.1 or greater is working fine with other distros or compiled from source. (there was a question in gentoo forum about a way to get a version > 3.4.6 some days ago, but no response.) It would be great to have avr-gcc 4.1.1 or greater in Gentoo-Linux! Thank you all for your great work. Stefan Salewski Reproducible: Always Steps to Reproduce: 1. crossdev -t avr 2. crossdev -t avr --gcc 4.1.1 3. Actual Results: avr-gcc 3.4.6 is build Expected Results: avr-gcc 4.1.1 or greater is build
that's for the AVR guys to decide ... they asked i force gcc-3.4.6
(In reply to comment #1) > that's for the AVR guys to decide ... they asked i force gcc-3.4.6 > Forcing avr-gcc 3.4.6 was wise until october 2006. After this date working patches for avr-gcc 4.1.1 are available, see http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=42631 Personally I think advantages of avr-gcc 4.1.1 are not to big, but today most people (here in germany) are using avr-gcc 4.1.1. I hope you can integrate necessary patches, so that Gentoo-users can decide if the like to use 3.4.6 or 4.1.1 or newer. Thanks Stefan Salewski
I really believe upgrading to gcc 4 is a good thing. I've noticed it corrected a weird bug in a program of mine where optimization led to a strange behavior in a switch block. With gcc 4 I could turn size optimization on and still have the code behaving correctly. I did this with an overlay build of crossdev, without any additional patches to gcc. Indeed something bad could have happened, but it didn't.. Now that it is safer to use gcc-4, I see no reason to hard-limit the gcc version. If you still don't like it you could print a warning stating that it's done at our own risk..
i dont use avr at all ... if you want something updated in gcc, post a tarball of patches that i can simply unpack into the existing gcc patchset with relevant documentation as to where each patch came from note that i mean the patch has to be compatible with epatch naming schema
(In reply to comment #4) > i dont use avr at all ... if you want something updated in gcc, post a tarball > of patches that i can simply unpack into the existing gcc patchset with > relevant documentation as to where each patch came from > > note that i mean the patch has to be compatible with epatch naming schema > Seems that no special patches are necessary for avr-gcc 4.x.x today! I have done some google search about this topic and put a question about necessary patches to avr-gcc mailing-list yesterday (no response). There is a detailed internet page about avr-gcc installation on linux at http://avrwiki.com/wiki/index.php/Building_AVR_GCC There are some remarks about necessary or not working options, but patched are not mentioned. I can not test it with an overlay on my box because I am not familar with crossdev now, sorry. Best regards Stefan Salewski
Stefan: technically speaking gcc 3.4.6 also works out of the box for AVR. It's a matter of device support, if you stick with mainstream gcc and binutils you'll only have a handsome of devices supported and these won't be the newest. Vanilla gcc 4.1.1 will support more devices than vanilla gcc 3.4.6, but gentoo's gcc 3.4.6 + patches supports more devices than vanilla gcc 4.1.1, so basically it'd be a regression. Basically what we do and spanky wants is the needed split patches to support most devices (not the just-released, lightly tested and "you can't get that chip yet" ones). This are usually announced in the avr-libc-dev mailing list as "Add new device support: XXX", which is usually a binutils patch, a gcc patch and an avr-libc patch (i stick with the "until a new avr-libc is released which supports said device isn't shipped i won't patch binutils/gcc" mantra). Also sometimes some work needs to be done to get all these patches to work nice together (hand patching) so as to get a unified patch to spanky - just linking a ton of URLs won't do. I'm not against getting gcc-4.1.x into AVR-niceness but vanilla just won't cut it and i personally lack the time at the moment to do so and test it.
Created attachment 119887 [details] AVR patches for binutils 2.17 AVR patches for binutils 2.17 from http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/avr-binutils/files/
Created attachment 119888 [details] AVR patches for gcc 4.1.2 AVR patches for gcc 4.1.2 from http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/avr-gcc/files/
@toolchain please add patches to gcc-4.1.2 and binutils-2.17, crossdev can then be changed to recommend these versions afterwards, thanks.
ive added the binutils patches as those are pretty much just backports from current cvs ... gcc is also all backports except for this: 58_all_gcc4-avr-atmega256x-r1.1.patch which comes from: http://gcc.gnu.org/ml/gcc-patches/2006-05/msg00534.html which hasnt been commented on let alone merged ... do you actually need this, or you just adding it because it's in FreeBSD ? ;)
The mega256* devices are a new kind of AVR ISA (avr6 iirc) which has extended memory addressing and gcc completely lacks support for yet. I don't use them but maybe some user wants to. If they're too intrusive for your liking just leave them out.
BTW the mega256* patch is shipped in WinAVR so it's in production use.
ok, i'd prefer to not merge it, but since it only modifies avr files, i cant complain that it'll screw with other ports ;) added the stuff to our patchset, it'll prob be part of gcc-4.1.2-r1
Is it possible to install avr-gcc > 3.4.6 now? I need at least avr-gcc 4.1 to ensure that my USB firmware developed with version 3.4.6 is compatible with newer avr-gcc releases (which most people use now) I was not successful to ask crossdev to install avr-gcc > 3.4.6. Thanks Stefan Saleswki
Tried again to install avr-gcc 4.x: crossdev --target avr --gcc 4.1.2 --binutils 2.17 now works, but it builds version 3.4.6 too, so we have to use gcc-config avr-4.1.2 source /etc/profile before we can use version 4.1.2 avr-gcc --target-help lists at90usb1287, but avr-gcc -mmcu=at90usb1287 test.c gives unknown MCU 'at90usb1287' specified test.c:1: Fehler: MCU »at90usb1287« nur für Assemblierung unterstützt Seems that a "New-Devices" patch is missing. Currently I do not know which patch this is, or where to insert it. Regards Stefan Salewski
Some days ago I found a script for installing avr-gcc 4.1.2 (including patches for new devices)) in a german microcontroller forum: http://www.mikrocontroller.net/topic/77150#new Script is an appendix of the first (and in a modified version to the last) posting of this thread. This script installs avr-gcc to /usr/local -- if you start it without being root, root-password is asked a few times. I have tested the installation with AT90USB1287 device, seems to work.
crossdev allows any gcc version to be installed now for avr