Updated the "Script for building AVR-GCC 4.2.2 on Linux

Go To Last Post
21 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Jörg & Eric has been busy , and have released a new version of both WinAVR and avrlibc.

I have updated the Linux buildscripts with the new patches , and to use the new avrlibc 1.6.1.

The new script now knows the following mcu's , and have been updated to solve the makeinfo problem with binutils.

Known MCU names:
  avr1 avr2 avr3 avr4 avr5 avr6 at90s1200 attiny10 attiny11 attiny12
  attiny15 attiny28 at90s2313 at90s2323 at90s2333 at90s2343 attiny22
  attiny26 at90s4433 at90s4414 at90s4434 at90s8515 at90s8535 at90c8534
  at86rf401 attiny13 attiny2313 attiny261 attiny461 attiny861 attiny24
  attiny44 attiny84 attiny25 attiny45 attiny85 attiny43u attiny48 attiny88
  atmega603 atmega103 at43usb320 at43usb355 at76c711 at90usb82 at90usb162
  atmega48 atmega48p atmega8 atmega83 atmega85 atmega88 atmega88p
  atmega8515 atmega8535 atmega8hva at90pwm1 at90pwm2 at90pwm2b at90pwm3
  at90pwm3b atmega16 atmega161 atmega162 atmega163 atmega164p atmega165
  atmega165p atmega168 atmega168p atmega169 atmega169p atmega32 atmega323
  atmega324p atmega325 atmega325p atmega328p atmega329 atmega329p
  atmega3250 atmega3250p atmega3290 atmega3290p atmega32hvb atmega406
  atmega64 atmega640 atmega644 atmega644p atmega128 atmega1280 atmega1281
  atmega1284p atmega645 atmega649 atmega6450 atmega6490 atmega16hva
  at90can32 at90can64 at90can128 at90pwm216 at90pwm316 at90usb6

/Bingo

Last Edited: Sun. Dec 23, 2007 - 08:58 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the quick followup, Bingo!

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo,

I've just build the new toolchain under Debian testing and there seems to be a problem with the Makefiles for binutils. Although I had installed texinfo and build-essentials the build process failed and it complained about missing makeinfo.

I had to add --run in all Makefiles under binutils-2.18/bfd when it calls missing to check for makeinfo. After that I called make all install clean by hand, removed building binutils from the build script and it works fine.

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MegaTorr wrote:
Bingo,

I've just build the new toolchain under Debian testing and there seems to be a problem with the Makefiles for binutils. Although I had installed texinfo and build-essentials the build process failed and it complained about missing makeinfo.

I had to add --run in all Makefiles under binutils-2.18/bfd when it calls missing to check for makeinfo. After that I called make all install clean by hand, removed building binutils from the build script and it works fine.

Markus

Hmmm..

I have had no problems on my Centos 4.5 EL , or on my Ubuntu 7.10 machine. So i can't reproduce it ...

But there was a thread within the last 2 weeks , where someone mentioned a patch , for building binutils.
But he never attached the patch , and Eric (EW) , said it might be related to some documentation building.

Maybe EW could give a hint ... It semed like he knew the poster.

Edit: Found the thread
https://www.avrfreaks.net/index.p...

/Bingo

Last Edited: Sun. Dec 23, 2007 - 10:00 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Markus

Did you use the clean-script :-)

And Btw: Did you fetch a fresh version of binutils ??

The Poster from the other thread writes this

Quote:
Maybe update the sticky script to a little newer binutils?

I don't know of any newer version of binutils than 1.18 , but sometiles they do make subreleases.
Meaning they resease a 1.18.2 , and the symlink to 1.18 then points to that one.

I did "Run" the full script with new downloads of all files , when testing.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:

I don't know of any newer version of binutils than 1.18 , but sometiles they do make subreleases.
Meaning they resease a 1.18.2 , and the symlink to 1.18 then points to that one.

/Bingo

It does not seem to be correct , what i have written in the above.

After a little more investigation , this bug seems to be related to the version of makeinfo installed.
If the version has a 2 digit subversion number , then the script fails. The makeinfo needed has to be >= 4.4 , but as they only checks the first subdigit , then 4.11 is read as 4.1 , and the build fails.

But it is possible to get a never "Snapshot" if binutils , ehere this is supposed to be fixed.
ftp://sourceware.org/pub/binutil...

I am working on incoorporating the patch , instead.
http://sourceware.org/bugzilla/s...

As i dont' know if the snapshot will break some of the other patchfiles.

@EW & Jörg
This one indicates that we might get the probl. in gcc also , but patches are in the link.
http://gcc.gnu.org/ml/gcc-patche...

/Bingo

Last Edited: Sun. Dec 23, 2007 - 01:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Markus and others

Would you care to try out the attached script.

I don't have the problem , so i rely on someone else to test this.

I haven't replaced it in the sticky , as i am only allowed 3 attachments. And i would like to keep the 4.12 build in there for a little more time.

I did see someone also apply a patch to configure , not just configure.ac

But the "official" binutils patch is just for configure.ac , so i hope configure is rebuild from confugure.ac , else we might have to apply a patch to configure also.

/Bingo

Attachment(s): 

Last Edited: Sun. Dec 23, 2007 - 01:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ohh i checked my version of makeinfo/texinfo (Ubuntu 7.10) w. latest updates :

a : makeinfo --version

gives : makeinfo (GNU texinfo) 4.8

Witch is prob. why i haven't got the symptoms.

What distros are you running ???

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is a script that patches both configure & configure.ac

Please report witch one that works out for you.

/Bingo

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey Bingo,

haven't tried the cleanup script yet (wanted to go after the progmem issue, so I left the sources around for now). But it's nice having it there, even a blind guy like me can see what's going on ;).

I'll try your new script right away.

Markus

PS:

markus@laura:~$ makeinfo --version
makeinfo (GNU texinfo) 4.11

makeinfo works fine, the makefiles were mangled.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Markus

Witch of the scripts did you use ??

The one that patches both configure and configure.ac ??

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried both scripts, they seem to miss the binutils-makeinfo-patch.diff file. Where can I get that from?

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The patch is included in the zipfile you download from this thread

I could'nt seem to find a place where to "wget" it , so i included it.

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll give it another shot.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

LOL, found it.

it IS included in the zip, but the first line in get-patches.sh:

rm -f *.diff

So that's where it gets lost. I'll add it in and see if the rest works (currently using makeinfo-fixed1, trying makeinfo-fixed afterwards).

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

MegaTorr wrote:
LOL, found it.

it IS included in the zip, but the first line in get-patches.sh:

rm -f *.diff

So that's where it gets lost. I'll add it in and see if the rest works (currently using makeinfo-fixed1, trying makeinfo-fixed afterwards).

Markus

Oopzzz :oops: :oops:

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo600 wrote:
Oopzzz

Don't worry, that's what beta testers are for, you do an awesome job.

makeinfo-fixed1 seems to work. I give your new script a go. Do you want me to test makeinfo-fixed as well?

Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well i don't think makeinfo-fixed will work , but as this is the "official" patch ... yes please try it

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Markus

One of the reasons that i still like the avr-gcc 4.12 to be in the sticky is this one

http://gcc.gnu.org/bugzilla/show...

And there seems to be some float issues w. the new avr-libc 1.61

(German thread)
http://www.mikrocontroller.net/t...

/Bingo

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Bingo,

The last script works like a charm. The first makeinfo-fixed breaks, as expected.

About the code size (I'm from Austria ;) ) I noticed that as well, although not to the extent posted there (I don't use floats and never use -O3). My tests indicate that 4.2.2 uses less code space than 4.1.2 (with -Os). I got about 60 bytes back in 2k bootloader (which is a lot when you're at 2042 bytes). And this is for already optimized code (an parts in assembler). I did some investigation when I switched to 4.1.2 and it seemed all in the register allocation. One man's gain is another man's loss...

Kepping 4.1.2 around for all the folks that (have to) use floats seems reasonable.

Thanks,
Markus

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Markus

Thanx for Betatesting , i'll put the last script in the sticky.

Normally people says "ohh..nooh" when i point them at a german thread , but i guess you understand it (and prob. much better than me). There are some things (german technical words) i cant understand , but mostly i do understand.
And a lot of the guyzz over there makes their programming comments in english.

Btw: Markus

Did you see this one (for saving space)
https://www.avrfreaks.net/index.p...

/Bingo