Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Bingo600
PostPosted: Dec 18, 2008 - 03:29 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

Guyzz

Quote:
Skip to the below url , as it contains a newer buildscript.


http://www.avrfreaks.net/index.php?name ... 123#538123



I have toyed a little around with the avr-gcc 4.3.2 toolchain , that is based on the WinAVR patches and included in FemtoOS 0.87.

I have adapted it to build under Ubuntu 8.04 , and have attached a zipfile with the modifications.

The Readme.txt
Quote:

This toolchain is build using the excellent toolchain script included in femtoos.

http://www.femtoos.org/

The version tested & used here is FemtoOS_0.87.zip

Download the femtoos archive here http://sourceforge.net/project/showfile ... _id=219072

I had to do a a little bit of modifications to the script , in order to get it to build under Ubuntu 8.04

And had to apply the makeinfo patch to binutils 2.18.

Steps to build :

1: Install all the packages mentioned in pre-reqs.txt

2: unzip FemtoOS_0.87.zip

3: Copy the binutils-makeinfo patch from the patch directory of this archive , to the same directory of FemtoOS_0.87

4: Copy the install_toolchain-ubuntu from the Install_Scripts directory of this archive to
the same directory of FemtoOS_0.87
5: Make sure the install_toolchain-ubuntu script is executable by doing a : chmod +x install_toolchain-ubuntu

6: Maybe edit the PREFIX variable around line 106 , to a prefix of your liking.
It default installs the toolchain in PREFIX=FemtoOS_0.87/IDE/proc.
If you change it to the default of /usr/local/avr , the script must be run with the sudo command , in order to
have write access to the install dir.

7: Change directory back to the main femtoos directory : FemtoOS_0.87

8: Build the toolchain by executing (remember sudo in front , if you install to /usr/local/avr).
Install_scripts/install_toolchain-ubuntu

or

sudo Install_scripts/install_toolchain-ubuntu

All credit goes to the author of femtoos , and the avr-gcc etc .. teams (Eric , Jörg et all)

You could actually try to build some of the femtoos apps , they look nice.

/Bingo



I must admit i haven't tried to compile an avr program yet Embarassed Embarassed

I just had it to build correctly.

But i have had several PM's asking for a 4.3.x toolchain for Linux , and seen several requests here.

As always .. there are no guarantees


Ohh ... unpack the attached archive on a linux box with unzip

/Bingo


Last edited by Bingo600 on Feb 08, 2009 - 03:22 PM; edited 3 times in total
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Dec 18, 2008 - 03:51 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

Supported mcu's

Code:


avr-gcc --target-help

Known MCU names:
  avr1 avr2 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1 avrxmega2
  avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 at90s1200 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 atmega103 at43usb320 at43usb355 at76c711 at90usb82 at90usb162
  attiny167 atmega48 atmega48p atmega8 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 atmega406 atmega64 atmega640
  atmega644 atmega644p atmega128 atmega1280 atmega1281 atmega1284p
  atmega645 atmega649 atmega6450 atmega6490 atmega16hva at90can32
  at90can64 at90can128 at90pwm216 at90pwm316 atmega32c1 atmega32m1
  atmega32u4 at90usb646 at90usb647 at90usb1286 at90usb1287 at94k
  atmega2560 atmega2561 atxmega64a1 atxmega128a1

 
 View user's profile Send private message  
Reply with quote Back to top
devlaam
PostPosted: Feb 07, 2009 - 12:28 PM
Newbie


Joined: Jul 04, 2007
Posts: 18


I have just released Femto OS v0.88. I contains a new toolchain builder. It builds:
- binutils 2.19
- gcc 4.3.3
- gmp 4.2.4
- mpfr 2.4.0
- dude 5.5
including all available patches and some non-official (but essential!). It automatically produces logfiles now and does not flood your screen any more. Tested on:
- Gentoo (Profiles 2007/2008)
- Ubuntu (fully updated)
- Mac (OSX 10.5.6)
- Windows (cygwin: 2000, XP)

Please note that that cygwin does not distribute the packages reliably, so testing is hard, and results differ.

The toolchain can be downloaded via my website:
http://www.femtoos.org/
choose: code - download.

If you experience problems or are successful on a new platform , please let me know, so i can improve the script. Mail me and please include a zipped log directory. Have fun!

Ruud Vlaming
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Feb 08, 2009 - 03:12 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

Nice work Ruud Smile

I guess this is the best AVR-GCC 4.3.x toolchain builder for Linux.

I will test The toolchain , as soon as i get the time Smile

Btw. isn't the makeinfo patch needed for binutils 2.19 ?? (I mean have they corrected it in there ??)


And i needed to do a :

Code:


sudo apt-get install gawk libtool



Before i succeded in installing (ubuntu 7.04) with all the packages installed that i normally need for building 4.2.2 (and mentioned in your Readme), but it was caught allready at the start of the install script. Nice detection Wink Wink

The build went fine , so i guess the makeinfo patch wasn't needed Smile

@Ruud : I just miss avarice & insight/gdb
Those should build "right out of the box" wo. any patches at all (at least on linux) , have a look at the 4.22 buildscript.


/Bingo


Last edited by Bingo600 on Feb 08, 2009 - 05:56 PM; edited 2 times in total
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Feb 08, 2009 - 05:40 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

Supported MCU's in the FemtoOS 0.88 build

Code:


~/avr/FemtoOS/FemtoOS_0.88/IDE/proc/bin$ ./avr-gcc --target-help

Known MCU names:
  avr1 avr2 avr25 avr3 avr31 avr35 avr4 avr5 avr51 avr6 avrxmega1
  avrxmega2 avrxmega3 avrxmega4 avrxmega5 avrxmega6 avrxmega7 at90s1200
  attiny11 attiny12 attiny15 attiny28 at90s2313 at90s2323 at90s2333
  at90s2343 attiny22 attiny26 at90s4414 at90s4433 at90s4434 at90s8515
  at90c8534 at90s8535 attiny13 attiny13a attiny2313 attiny24 attiny44
  attiny84 attiny25 attiny45 attiny85 attiny261 attiny461 attiny861
  attiny43u attiny48 attiny88 at86rf401 at43usb355 at76c711 atmega103
  at43usb320 attiny167 at90usb82 at90usb162 atmega8 atmega48 atmega48p
  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 atmega3250
  atmega3250p atmega328p atmega329 atmega329p atmega3290 atmega3290p
  atmega406 atmega64 atmega640 atmega644 atmega644p atmega645 atmega649
  atmega6450 atmega6490 atmega16hva at90can32 at90can64 at90pwm216
  at90pwm316 atmega16u4 atmega32c1 atmega32m1 atmega32u4 atmega32u6
  at90usb646 at90usb647 at94k atmega128 atmega1280 atmega1281 atmega1284p
  at90can128 at90usb1286 at90usb1287 atmega2560 atmega2561 atxmega64a3
  atxmega64a1 atxmega128a3 atxmega256a3 atxmega256a3b atxmega128a1


/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
devlaam
PostPosted: Feb 09, 2009 - 08:49 AM
Newbie


Joined: Jul 04, 2007
Posts: 18


Bingo600 wrote:
Nice work Ruud Smile
I guess this is the best AVR-GCC 4.3.x toolchain builder for Linux.

Thanks! Btw, the installer now has an option to choose your installation
location, so you are not bound to the Femto OS directory.

Bingo600 wrote:
The build went fine , so i guess the makeinfo patch wasn't needed Smile

Thank you for testing. And indeed, i don't think we need that patch any more.

Bingo600 wrote:

@Ruud : I just miss avarice & insight/gdb
Those should build "right out of the box" wo. any patches at all (at least on linux) , have a look at the 4.22 buildscript.

Yeah, well, i do not use those tools, but others do. I will see if i can include them in my next release. My toolchain builder was actually not meant to be a general tool, but merely a tool to get the Femto OS up and running, but it has got a little out of hand i guess Wink

Ruud.
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Feb 10, 2009 - 04:04 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

Quote:
My toolchain builder was actually not meant to be a general tool, but merely a tool to get the Femto OS up and running, but it has got a little out of hand i guess Wink


But it turned out so nicely Smile

/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
westkite2000
PostPosted: Feb 25, 2009 - 09:09 PM
Rookie


Joined: Oct 22, 2002
Posts: 37


Hey Guys

Hope you can help me with this:

Code:

make[2]: Entering directory `/home/AVR/FemtoOS_0.88/download/binutils-2.19-build/opcodes'
make  all-recursive
make[3]: Entering directory `/home/AVR/FemtoOS_0.88/download/binutils-2.19-build/opcodes'
Making all in po
make[4]: Entering directory `/home/AVR/FemtoOS_0.88/download/binutils-2.19-build/opcodes/po'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/AVR/FemtoOS_0.88/download/binutils-2.19-build/opcodes/po'
make[4]: Entering directory `/home/AVR/FemtoOS_0.88/download/binutils-2.19-build/opcodes'
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19/opcodes -I. -I. -I../../binutils-2.19/opcodes -I../bfd -I../../binutils-2.19/opcodes/../include -I../../binutils-2.19/opcodes/../bfd     -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o dis-buf.lo ../../binutils-2.19/opcodes/dis-buf.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19/opcodes -I. -I. -I../../binutils-2.19/opcodes -I../bfd -I../../binutils-2.19/opcodes/../include -I../../binutils-2.19/opcodes/../bfd -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-2.19/opcodes/dis-buf.c -o dis-buf.o
/bin/bash ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19/opcodes -I. -I. -I../../binutils-2.19/opcodes -I../bfd -I../../binutils-2.19/opcodes/../include -I../../binutils-2.19/opcodes/../bfd     -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c  -DARCH_avr ../../binutils-2.19/opcodes/disassemble.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19/opcodes -I. -I. -I../../binutils-2.19/opcodes -I../bfd -I../../binutils-2.19/opcodes/../include -I../../binutils-2.19/opcodes/../bfd -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -DARCH_avr ../../binutils-2.19/opcodes/disassemble.c -o disassemble.o
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19/opcodes -I. -I. -I../../binutils-2.19/opcodes -I../bfd -I../../binutils-2.19/opcodes/../include -I../../binutils-2.19/opcodes/../bfd     -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o dis-init.lo ../../binutils-2.19/opcodes/dis-init.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19/opcodes -I. -I. -I../../binutils-2.19/opcodes -I../bfd -I../../binutils-2.19/opcodes/../include -I../../binutils-2.19/opcodes/../bfd -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-2.19/opcodes/dis-init.c -o dis-init.o
/bin/bash ./libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19/opcodes -I. -I. -I../../binutils-2.19/opcodes -I../bfd -I../../binutils-2.19/opcodes/../include -I../../binutils-2.19/opcodes/../bfd     -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c -o avr-dis.lo ../../binutils-2.19/opcodes/avr-dis.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../binutils-2.19/opcodes -I. -I. -I../../binutils-2.19/opcodes -I../bfd -I../../binutils-2.19/opcodes/../include -I../../binutils-2.19/opcodes/../bfd -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../binutils-2.19/opcodes/avr-dis.c -o avr-dis.o
cc1: warnings being treated as errors
../../binutils-2.19/opcodes/avr-dis.c: In function 'avr_operand':
../../binutils-2.19/opcodes/avr-dis.c:112: error: format not a string literal and no format arguments
../../binutils-2.19/opcodes/avr-dis.c:162: error: format not a string literal and no format arguments
../../binutils-2.19/opcodes/avr-dis.c:171: error: format not a string literal and no format arguments
../../binutils-2.19/opcodes/avr-dis.c:182: error: format not a string literal and no format arguments
make[4]: *** [avr-dis.lo] Error 1
make[4]: Leaving directory `/home/AVR/FemtoOS_0.88/download/binutils-2.19-build/opcodes'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/AVR/FemtoOS_0.88/download/binutils-2.19-build/opcodes'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/AVR/FemtoOS_0.88/download/binutils-2.19-build/opcodes'
make[1]: *** [all-opcodes] Error 2
make[1]: Leaving directory `/home/AVR/FemtoOS_0.88/download/binutils-2.19-build'
make: *** [all] Error 2

===> Results of this script:
- tools: succes
- download: succes
- patches: succes
- bin-utils: failure
- gcc: skipped
- avr-libc: skipped
- avr-dude: skipped
See /home/AVR/FemtoOS_0.88/log/install_090225_215732.log for more details.


I'm running on an Ubuntu 8.10
As you can see it will not compile the binutils. What can I do?

Please help
/Thomas
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Feb 26, 2009 - 09:07 AM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

I'd say this is the problem :

Quote:
cc1: warnings being treated as errors


It comes from this option being enabled

Code:
-Werror


The ppl@Ubuntu , went crazy and enabled a lot of new warnings in 8.10 by default , and this is causing the (warnings) witch is treated as errors.

Try to add this to the build line for binutils
Code:
--disable-werror CFLAGS="-Wno-format-security "


Right after the
Code:
--with-dwarf2


The buildline looks like this , and is on line 585 for FemtoOs 0.88

Code:
 ../binutils-$UTILS_VERSIE/configure --prefix=$PREFIX --target=avr --disable-nls --with-gnu-ld --with-gnu-as --enable-install-libbfd --with-dwarf2  >>$LogFile 2>&1



/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
westkite2000
PostPosted: Feb 27, 2009 - 07:24 PM
Rookie


Joined: Oct 22, 2002
Posts: 37


Thanks Bingo

It worked perfect! Razz

But a little further down the lane there was another error with the GCC installation.

Code:

===> compiling and installing gcc 4.3.3
configure: error: cannot find install-sh or install.sh in ../gcc-4.3.3 ../gcc-4.3.3/.. ../gcc-4.3.3/../..
make: *** No targets specified and no makefile found.  Stop.


I can see there is a install-sh in the mpfr folder. How do I tell the install toolchain where to locate the file?

Thanks
/Thomas
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Feb 28, 2009 - 12:30 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

You need to post more of the error lines.

But to me it seems like it looks in the gcc-4.3.3 dir for an install-sh , are you sure it is mpfr it is complaining about ??

Edit: Uhmmm ... I haven't had any problems on 8.04 or 8.10 (w. above modification).

But i just did the "Build" as a normal user wo. any parameters on the comandline (i know you can specify an alternate "prefix" aka. install dir)

Are you sure the file install-sh is executable ??


/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
gd.smth
PostPosted: Mar 05, 2009 - 05:45 PM
Newbie


Joined: Mar 01, 2009
Posts: 3


I had a problem with the selected gcc mirror that would not download completely. I changed to another one which is OK but the script assumed the incomplete download was complete and skipped it. I deleted all the download files and tried again and all seemed to download but still got error message that download was incomplete, try again when net less busy. Log showed no error and all files OK. Finally, saw in readme to try the clean function after errors and now OK.

However, unlike typical GNU style builds, I don't see all the stuff scrolling by but just the "progress" meter. I don't see an option to enable "verbose" mode with no meter, which I kind of like.

Otherwise, seems like a good script for building the latest tools. But I also agree it needs insight and avaice included to be the same a winavr (I understand it was not indented for this).

Builds and compiles my project on Fedora8.

Thanks,
-gene
 
 View user's profile Send private message  
Reply with quote Back to top
gd.smth
PostPosted: Mar 05, 2009 - 08:52 PM
Newbie


Joined: Mar 01, 2009
Posts: 3


One more comment. I changed the wget option -nc to -N so that timestamp and size decide whether to download. This seems to fix the problem of partial downloads not downloading the next time. And when script option --clean is used and cookie file download-success.res in /download is deleted, most files are not downloaded again and an error is not flagged that prevents the build. However, some files such as avr-dude and mpfr (small and quick) do download again after a --clean.
-gene
 
 View user's profile Send private message  
Reply with quote Back to top
gd.smth
PostPosted: Mar 05, 2009 - 11:49 PM
Newbie


Joined: Mar 01, 2009
Posts: 3


Sorry, one (really two) more questions: The "sticky" post on this subject also has a build script. It contains serveral patches to binutils from freebsd. I don't see these in the femtoos scripts I don't think. Are they really needed?

Also, the femtoos script builds "avr-gcc-4.3.3" but the gcc patches used are for gcc-4.3.2 which is the latest in winavr (soureforge) which I assume is the "master" project for avr-gcc. I guess since there are no patch conflicts that this is OK?
 
 View user's profile Send private message  
Reply with quote Back to top
devlaam
PostPosted: Mar 06, 2009 - 08:44 AM
Newbie


Joined: Jul 04, 2007
Posts: 18


gd.smth wrote:
I had a problem with the selected gcc mirror that would not download completely. I changed to another one which is OK but the script assumed the incomplete download was complete and skipped it. I deleted all the download files and tried again and all seemed to download but still got error message that download was incomplete, try again when net less busy. Log showed no error and all files OK. Finally, saw in readme to try the clean function after errors and now OK.

Thats a bit odd, but not impossible. If wget tries to connect but is not able you may get that, even if the file is already there. Btw my wget on gentoo does not try to connect if the file is present, but wget on osx does.

gd.smth wrote:
However, unlike typical GNU style builds, I don't see all the stuff scrolling by but just the "progress" meter. I don't see an option to enable "verbose" mode with no meter, which I kind of like.

Every thing that scrolls by is captured and pushed to a log file. The progress meter is made to be able to view the main steps of the script. Furthermore, I often run this script over a network connection and all the data slows the receiving pc down. But an option would be better and I agree it is not GNU like.

gd.smth wrote:
Builds and compiles my project on Fedora8.

I'll put that on the list Smile

gd.smth wrote:
Sorry, one (really two) more questions: The "sticky" post on this subject also has a build script. It contains serveral patches to binutils from freebsd. I don't see these in the femtoos scripts I don't think. Are they really needed?

I have not yet looked into that, and i have no freebsd at hand, so i cannot test. Testing is needed before i can see anything sensable about that. Maybe next release.

gd.smth wrote:
Also, the femtoos script builds "avr-gcc-4.3.3" but the gcc patches used are for gcc-4.3.2 which is the latest in winavr (soureforge) which I assume is the "master" project for avr-gcc. I guess since there are no patch conflicts that this is OK?

At the time i wrote the script there where no patches released for 4.3.2 yet, so there was not much choice. And indeed, there are no conflicts and this is OK.

gd.smth wrote:
One more comment. I changed the wget option -nc to -N so that timestamp and size decide whether to download. This seems to fix the problem of partial downloads not downloading the next time. And when script option --clean is used and cookie file download-success.res in /download is deleted, most files are not downloaded again and an error is not flagged that prevents the build. However, some files such as avr-dude and mpfr (small and quick) do download again after a --clean.

W'll have to see if it cross platform stable (usually options tend to behave differently on different platforms.) I thought about it too, but then every file forces a connect, wether present or not. This increases problems on busy mirros. Actually, at the time of writing i was already thinking of an other solution, and that is the inclusion of md5 sums of every file. Then we can be really sure we have the original file in perfect shape.


Ruud
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Mar 10, 2009 - 05:22 PM
Raving lunatic


Joined: Apr 25, 2004
Posts: 3817
Location: Denmark

@Ruud & gene

The "sticky" buildscript uses the patches from Jörg's FreeBSD port of avr-gcc.

The patches are like Erics patches for WinAVR ,but are made by Jörg , and kept in the FreeBSD repository.


But ... NEVER... mix the patches , unless you are absolutely sure what you do.

So yes ... there are two ports of avr-gcc , and afaik Ruud is the only one who made a Linux port , based on the WinAVR port.

Ps: Ruud , you don't need a FreeBSD to build the FreeBSD port , it compiles fine on a Linux.

/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits