New avr-gcc-4.5.1 with avr-libc-1.8.0 and gdb-7.3.1

Last post
19 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Basically added the new avr-libc-1.8.0 to the below

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&t=115145

/Bingo

Attachment(s): 

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

Are there releast notes for avr-libc 1.8.0 and "what's changed?". Or is it just from avr-libc's SVN head?

avrfreaks does not support Opera. Profile inactive.

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

1.8.0 was tagged at rev 2273 at which point the "NEWS" said:

http://svn.savannah.nongnu.org/viewvc/tags/avr-libc-1_8_0-release/avr-libc/NEWS?revision=2273&root=avr-libc&view=markup

Quote:

*** Changes in avr-libc-1.8.0:

* Bugs fixed:

  [#17815] Configure does not honor --mandir option
  [#23234] Alternate interrupt macro
  [#24861] Interrupt documentation contains extra include
  [#32103] Support for Target-Triplets
  [#32419] Incorrect EEPROM size in header for ATxmega192A3
  [#32650] Missing include in util/delay.h
  [#32675] power_all_enable/disable does not affect timer1 on ATmega164P
  [#32698] power.h has additional endif that will break the build
  [#32773] stdiodemo source code is broken
  [#32988] Internal compiler error: build_unary_op
  [#33130] twitest.c source code is broken
  [#33230] Sleep modes have incorrect names for ATtiny261/461/861
  [#33238] Wrong _VECTORS_SIZE for mega8U2 et al
  [#33858] in avr/power.h, clock_prescale_set() not defined for mega328
  [#33920] ICR1 incorrectly defined for tiny167
  [#34047] missing math.h include in delay.h
  [#34514] misspelled in math.h
  [#35020] stdint.h: signed types need explicit "signed"
  [#35093] strlcat_P fails for some destinations
  [no-id]  New names for CLKSTA/CLKSEL0/1 for AT90USB82/162
  system when power_all_disable() is used
  [no-id]  util/delay.h would not compile with -ffreestanding

* New devices supported:

* Contributed Patches:

  [#7531] Bad name of bit in TCCR0A : WGM0 instead of CTC0 for ATtinyX61
  [#7362] iom16a.h: USART vectors inconsistently named for ATmega16A
  [#7226] ATMEGA8U2 Patches

* Other changes:

  - The old prog_* typedefs are now deprecated, and are only included
  if requested by the user.  This request is expressed by declaring
  the macro __PROG_TYPES_COMPAT__, either by a #define directive
  before including , or by a -D compiler option.

  - Optimized strlen_P, thanks to Jan Waclawek. Rename strlen_P to be
  __strlen_P and add new strlen_P inline function in header file that
  checks if value is a constant and known at compile time. If not,
  then the new inline function calls __strlen_P as normal.

 

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

SprinterSB wrote:
Are there releast notes for avr-libc 1.8.0 and "what's changed?". Or is it just from avr-libc's SVN head?

The file used is "an official release" aka downloaded from
http://download.savannah.gnu.org/releases/avr-libc/

/Bingo

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

Thanks for some reason I had a link to outdated CVS repository...

avrfreaks does not support Opera. Profile inactive.

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

> Are there releast notes for avr-libc 1.8.0 and "what's changed?".

Sorry, I forgot to update the project web pages after the release.

That's done now.

> Or is it just from avr-libc's SVN head?

Basically, yes, it's just that.

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.
Please read the `General information...' article before.

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

05-jan-2012
Also uploaded .deb files to http://www.wrightflyer.co.uk/avr-gcc/
Thanx to clawson for hosting the files.

Edit:
I made a small "goof" in the .deb package naming
They should have used dec-30 , instead of dec-29 in the name.
As the switch to avr-libc-1.8.0 was done on dec-30.

You'll prob survive :-)

/Bingo

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

Hi,

Thanks for the script, saved me an hour to two.

Due to a bug in gcc/configure not passing arguments down when building
mpfr and mpc both will fail to build when building at the same time as gcc. If your to lazy to install gmp/mpfr/mpc (like me), have old versions or do not have root access this is how I got around the issue.

in my case i'm using /usr/local/avr but this could be any directory you choose for your prefix.

# the original error while building gcc.

./buildavr-toolchain.sh

...
checking for gmp.h... no
configure: error: gmp.h can't be found, or is unusable.
make[1]: *** [configure-mpfr] Error 1
make[1]: Leaving directory `/usr/local/avr/build/gcc-4.5.1'
...
build/genmodes -h > tmp-modes.h
/bin/sh: build/genmodes: No such file or directory
make[2]: *** [s-modes-h] Error 127
make[2]: Leaving directory `/usr/local/avr/build/gcc-4.5.1/gcc'
make[1]: *** [install-gcc] Error 2
make[1]: Leaving directory `/usr/local/avr/build/gcc-4.5.1'
make: *** [install] Error 2
(./buildavr-toolchain.sh) GCC build failed

# need to build gmp/mpfr/mpc separately but as
# the gmp/mpc/mpfr source has been patched in
# the gcc-4.5.1 directory and not gmp-4.3.2, mpc-0.9
# etc need to copy them over.

# back up the old ones

PATH=$PATH:/usr/local/avr/bin
export PATH
cd /usr/local/avr/source
mv gmp-4.3.2 gmp-4.3.2.old
mv mpc-0.9 mpc-0.9.old
mv mpfr-3.1.0 mpfr-3.1.0.old

# move new patched versions

cd gcc-4.5.1
mv gmp ../gmp-4.3.2 
mv mpc ../mpc-0.9
mv mpfr ../mpfr-3.1.0

# get rid of half built gcc.

cd ../../build
rm -rf gcc-4.5.1

# start building

mkdir gmp-4.3.2
cd gmp-4.3.2
../../source/gmp-4.3.2/configure \
    --prefix=/usr/local/avr/build/tmp
make install

cd ../
mkdir mpfr-3.1.0
cd mpfr-3.1.0
../../source/mpfr-3.1.0/configure \
    --prefix=/usr/local/avr/build/tmp \
    --with-gmp=/usr/local/avr/build/tmp
make install

cd ../
mkdir mpc-0.9
cd mpc-0.9
../../source/mpc-0.9/configure \
    --prefix=/usr/local/avr/build/tmp \
    --with-gmp=/usr/local/avr/build/tmp \
    --with-mpfr=/usr/local/avr/build/tmp
make install

cd ../

# next build gcc

CFLAGS="-Wl,-rpath,/usr/local/avr/build/tmp/lib"
export CFLAGS

mkdir gcc-4.5.1
cd gcc-4.5.1
../../source/gcc-4.5.1/configure \
    --prefix=/usr/local/avr \
    --target=avr --disable-nls \
    --disable-libssp \
    --enable-languages="c,c++" \
    --with-gmp=/usr/local/avr/build/tmp \
    --with-mpfr=/usr/local/avr/build/tmp \
    --with-mpc=/usr/local/avr/build/tmp

make all
make install clean
unset CFLAGS

# now tell buildavr-toolchain.sh we have built gcc.

cd 
touch ok-build-gcc-4.5.1

run buildavr-toolchain.sh again and it will continue and build libc

./buildavr-toolchain.sh
[...]
(./buildavr-toolchain.sh) 
(./buildavr-toolchain.sh) installation of avr GNU tools complete
(./buildavr-toolchain.sh) add /usr/local/avr/bin to your path to use the avr GNU tools
(./buildavr-toolchain.sh) you might want to run the following to save disk space:
(./buildavr-toolchain.sh) 
(./buildavr-toolchain.sh) rm -rf /usr/local/avr/source /usr/local/avr/build

# cool.
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@robavr

Thanx for the report.

Did you file a bugreport with the avr-gcc maintainers ?

/Bingo

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

Hi, I added a centos buildscript (based on your) and atmel patches to your package. I didn't modified any of existing files just added new files.

My buildscript use all of the atmel avr-libc patches and patches are included in AVRStudio 5.1 installation, so the resulting toolchain is (I hope to) identical to AVRStudio 5.1 toolchain (except ncurses) with full device support. Also I'd ported 1.7.1 avr-libc patches for 1.8.0 so both are supported by this script.

CentOS build:

    1. make sure that binutils-devel and glibc-static packages are installed

    2. change prefix= line in this script OR create the /opt/tools/atmel directory and setup write permission for your user

    3. ./getfiles.sh

    4. ./get-patches.sh

    5. ./buildavr-toolchain-centos.sh

    6. change your path and/OR move the toolchain to your preferred location

I tested on CentOS6, x86 and x86_64 platforms, but might be works on CentOS5 also.

List of parts supported by avr-gcc:
at90s2313, at90s2323, at90s2333, at90s2343, attiny22, attiny26, at90s4414,
at90s4433, at90s4434, at90s8515, at90c8534, at90s8535, ata6289, attiny13,
attiny13a, attiny2313, attiny2313a, attiny24, attiny24a, attiny4313, attiny44,
attiny44a, attiny84, attiny84a, attiny25, attiny45, attiny85, attiny261,
attiny261a, attiny461, attiny461a, attiny861, attiny861a, attiny43u, attiny87,
attiny48, attiny88, attiny80, at86rf401, at43usb355, at76c711, atmega103,
at43usb320, at90usb82, at90usb162, atmega8u2, atmega16u2, atmega32u2, attiny167,
attiny1634, atmega8, atmega8a, atmega48, atmega48a, atmega48pa, atmega48p,
atmega88, atmega88a, atmega88p, atmega88pa, atmega8515, atmega8535, atmega8hva,
at90pwm1, at90pwm2, at90pwm2b, at90pwm3, at90pwm3b, at90pwm81, at90pwm161,
atmega16, atmega16a, atmega161, atmega162, atmega163, atmega164a, atmega164p,
atmega164pa, atmega165, atmega165a, atmega165p, atmega165pa, atmega168,
atmega168a, atmega168p, atmega168pa, atmega169, atmega169a, atmega169p,
atmega169pa, atmega16hva, atmega16hva2, atmega16hvb, atmega16hvbrevb, atmega16m1,
atmega16u4, atmega26hvg, atmega32, atmega32a, atmega323, atmega324a, atmega324p,
atmega324pa, atmega325, atmega325a, atmega325p, atmega325pa, atmega3250,
atmega3250a, atmega3250p, atmega3250pa, atmega328, atmega328p, atmega329,
atmega329a, atmega329p, atmega329pa, atmega3290, atmega3290a, atmega3290p,
atmega3290pa, atmega32c1, atmega32m1, atmega32u4, atmega32u6, atmega406,
atmega64, atmega64a, atmega640, atmega644, atmega644a, atmega644p, atmega644pa,
atmega645a, atmega645p, atmega645, atmega6450, atmega6450a, atmega6450p,
atmega649, atmega649a, atmega649p, atmega6490, atmega6490a, atmega6490p,
atmega64c1, atmega64m1, atmega64hve, atmega64rfa2, atmega64rfr2, atmega32hvb,
atmega32hvbrevb, atmega48hvf, at90can32, at90can64, at90pwm216, at90pwm316,
atmega16c1, atmega32c1, atmega64c1, atmega16m1, atmega32m1, atmega64m1,
atmega16u4, atmega32u4, atmega32u6, at90scr100, at90usb646, at90usb647, at94k,
m3000, atmega128, atmega128a, atmega1280, atmega1281, atmega1284, atmega1284p,
atmega128rfa1, atmega128rfa2, atmega128rfr2, at90can128, at90usb1286,
at90usb1287, atmega2560, atmega2561, atmega256rfa2, atmega256rfr2, atmxt224,
atmxt224e, atmxt336s, atxmega16a4, atxmega16a4u, atxmega16c4, atxmega16d4,
atxmega16x1, atxmega32a4, atxmega32a4u, atxmega32c4, atxmega32d4, atxmega32x1,
atxmega64a3, atxmega64a3u, atxmega64a4u, atxmega64b1, atxmega64b3, atxmega64d3,
atxmega64d4, atxmega64a1, atxmega64a1u, atxmega128a3, atxmega128a3u,
atxmega128b1, atxmega128b3, atxmega128c3, atxmega128d3, atxmega128d4,
atxmega192a3, atxmega192a3u, atxmega192c3, atxmega192d3, atxmega256a3,
atxmega256a3u, atxmega256a3b, atxmega256a3bu, atxmega256c3, atxmega256d3,
atxmega384c3, atxmega384d3, atxmega128a1, atxmega128a1u, atxmega128a4u, attiny4,
attiny5, attiny9, attiny10, attiny20, attiny40, at90s1200, attiny11, attiny12,
attiny15

Attachment(s): 

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

Thanks for the script and the notes regarding it

Now I've tried on two Laptops (Kubuntu Lucid Lynx 10.04.3 LTS) to install the toolchain by the script: both times the empty space of root didn't reach, the building of the toolchain aborted without warning, i got only a blackscreen and couldn't login grafically (KDE) anymore.
The install-dir was /usr/local/avr, and there were about 2GB of empty space on root (I've unfortunately ony 40GB-Disk on that Laptop: 10GB root, 30GB /home).
Changing to terminal, freeing /tmp, /usr/local/avr/build-space and a

sudo service kdm restart

let me work again with KDE
If i try to install the toolchain in my /home-dir, is there still the need for extending the $PATH?
How could i then integrate the toolchain into the Eclipse-CDT?

Thanks for any advice

Ewald

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

@Evald

You could just build & install in your home dir.
Edit the build* files and change the "PREFIX" to your desired install dir.

Or you could try the pre-built debian install package from here (i386 for 32-bit x64 for 64-bit) , doesn't take up much space
http://www.wrightflyer.co.uk/avr-gcc/

avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386.deb
avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.i386.txt

avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.x64.deb
avr-gcc-4.5.1-avrfreaks-2011-dec-29-u10.04.x64.txt

It's made on Ubuntu 10.04 , and i'd guess it will work on your Kubuntu.
Make sure that /usr/local/avr is empty/non existant before installing it.

You still have to add it to your PATH or point Eclipse to it "somehow"

Quote:

Install it using the 'dpkg -i '
The tools will be installed in /usr/local/avr with the commands in /usr/local/avr/bin
That directory is not automatically added to the PATH so to use the package after installation
use 'export PATH=$PATH:/usr/local/avr/bin' or add a command to achieve this permanently to your bash profile

/Bingo

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

Quote:

i'd guess it will work on your Kubuntu.

It will ;-)

Cliff (Kubuntu user)

 

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

BTW: Is there a special reason not to use the recommended way to arrange for the prerequisites GMP/MPC/MPFR?

avrfreaks does not support Opera. Profile inactive.

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

Thanks for that fast reply,

I knew the .deb-Package you mentioned, but in the readme of the december,30-version a gcc-4.5.1 - Version was referred to, and my gcc --version
is 4.4.3,so i thaught, i should compile the toolchain new.

muelux@muelux-LT6cA:/$ gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.

Do you think, my resources (on the Toshiba with larger disk) would be sufficient?

muelux@muelux-LT6cA:/$ df -hm
Dateisystem           1M‐Blöcke   Benutzt Verfügbar Ben% Eingehängt auf
/dev/sda5                15018     13067      1188  92% /
none                      1504         1      1503   1% /dev
none                      1508         0      1508   0% /dev/shm
none                      1508         1      1508   1% /var/run
none                      1508         0      1508   0% /var/lock
none                      1508         0      1508   0% /lib/init/rw
/dev/sda7                64171     47443     13469  78% /home

muelux@muelux-LT6cA:/$ du -hm ~/avr --max-depth=2
9       /home/muelux/avr/source/mpfr-3.1.0
147     /home/muelux/avr/source/binutils-2.20.1
4       /home/muelux/avr/source/mpc-0.9
570     /home/muelux/avr/source/gcc-4.5.1
14      /home/muelux/avr/source/gmp-4.3.2
19      /home/muelux/avr/source/avr-libc-1.7.1
760     /home/muelux/avr/source
760     /home/muelux/avr

Now i tried installing the avr-gcc-4.5.1-avrfreaks.[...]i386-Package (with GDebi-Installer, as default); now i got a few versions of avr-gcc on my system: how should i cleanup the system?
Is it sufficient, deleting the old /usr/bin/avr-Path before installing the new one or should i better use the paketmanager?

Attachment(s): 

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

If you installed the /usr/bin/avr version with a packet manager i guess you should use that one to remove it

/Bingo

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

SprinterSB wrote:
BTW: Is there a special reason not to use the recommended way to arrange for the prerequisites GMP/MPC/MPFR?

No ...
I just used the same way as Ruud V. (FemtoOS)

/Bingo

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

getfiles.sh UPDATE

Replaced:

ftp://ftp.dkuug.dk -> http://ftp.gnu.org

#!/bin/bash

#
#Save base/build dir
#
base=${PWD}

#
# Check , then get package versions 
#
if [ ! -e ${base}/package-versions ]
then
echo The file ${base}/package-versions must exist 
exit 1
fi
#

#
# Get package versions 
#
source ${base}/package-versions
#

#
# Get GDB
#
#wget -c  ftp://sourceware.org/pub/insight/releases/${insighttar}
wget -c ftp://ftp.sunet.se/pub/gnu/gdb/${gdbtar}

#
# Get avarice
#
wget -c  http://downloads.sourceforge.net/avarice/${avaricetar}

#
# Get avrdude
#
wget -c  http://download.savannah.gnu.org/releases/avrdude/${avrdudetar}
wget -c  http://download.savannah.gnu.org/releases/avrdude/avrdude-doc-${avrdudever}.pdf

#
# Get Binutils
#	EDITED HERE
#
#wget -c  ftp://ftp.dkuug.dk/pub/gnu/ftp/gnu/binutils/binutils-2.19.1.tar.bz2
wget -c  http://ftp.gnu.org/gnu/binutils/${binutilstar}
#
# Get avr-libc
#
#
wget -c  http://download.savannah.gnu.org/releases/avr-libc/avr-libc-user-manual-${avrlibcver}.pdf.bz2
wget -c  http://download.savannah.gnu.org/releases/avr-libc/${avrlibctar}

#
# Get GMP
#
#wget -c http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.4.tar.bz2
wget -c http://ftp.sunet.se/pub/gnu/gmp/${gmptar}

#
# Get MPFR
#
#wget -c http://www.mpfr.org/mpfr-2.4.1/${mpfrtar}
wget -c http://ftp.sunet.se/pub/gnu/mpfr/${mpfrtar}

#
# Get MPC - Needed for GCC >= 4.5.0
#
wget -c http://www.multiprecision.org/mpc/download/${mpctar}

#
#Get GCC
# EDITED HERE
#
#wget -c  ftp://ftp.dkuug.dk/pub/gnu/ftp/gnu/gcc/gcc-4.3.2/gcc-4.3.2.tar.bz2
wget -c  ftp://ftp.gnu.org/gnu/gcc/${gcccore}/${gcccoretar}

#
# Done
#

;)

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

Thanx for posting the update

And btw. I had already corrected it in the "sticky" archive

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=download&id=17480

/Bingo