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: Oct 04, 2006 - 09:44 PM
Raving lunatic


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

[Moderator's note: as that thread is sticky now, please
avoid followups here. Rather open your own new thread
instead.]


Quote:
*** YOU MUST LOG IN TO DOWNLOAD THE SCRIPTS ***


Quote:
*** Experimental DEBUGGING of XMEGA's is supported on Linux. But the full protocol is still an Atmel secret.

See : http://www.avrfreaks.net/index.php?name ... p;t=114940

Quote:
Now also as a .deb install package ... Read further on below


Quote:

Here is a list of Linux tools & tips i use on Ubuntu
http://www.avrfreaks.net/index.php?name ... 163#654163


Guyzz i have succeded in building avr-gcc-4.3.4 w. avr-libc-1.6.8 , and Jörg's latest patches on my Ununtu 10.04

Quote:
I'm only testing on the latest Ubuntu LTS.
All other version & distro's , are not guaranteed to work/compile. I'll try to help out , and so will the forum i'm sure. But don't demand support if it doesn't work , just ask nicely in the forum


I am enclosing the scripts i use (credits of A. Erasmus) , if they could be of any use

The steps are these:

Read Readme.txt
Then install the packages listed in pre-reqs.txt.



Note !!
Don't try to call the scripts from another directory location , always execute from same directory where the scripts are located.
The current scripts uses recursive deletes , that could erase the harddisk if the above isn't honored.


Then....

1: Make sure you are root (blushing) , or use sudo
2: Make a working directory , where you extract the files from the archive.
3: If desired edit the buildavr-no-insight.sh file , to change the prefix .. default is : prefix=/usr/local/avr
4: Make sure that the prefix dir is empty or nonexisting
5: Run : chmod +x *.sh
6: Run : ./getfiles.sh
7: Run : ./get-patches.sh
8: Run : ./buildavr-gdb.sh
9: Run: ./buildavr-toolchain.sh

You just answer yes to the existing directory question in step 9.


When building is done , you might want to free around 500MB of diskspace by removing the sources and binaries used to make avr-gcc.
To do so Run: ./buildavr-cleanup.sh

Note this little script expects the "build prefix" to be /usr/local/avr/


Edit:2
I have an avr user on my Linux-box for doing avr development , i have added this to my .bash_profile in my /home/avr directory , it sets up the path to avr-gcc.

Quote:

# User specific environment and startup programs
PREFIX=/usr/local/avr
export PREFIX

PATH=$PATH:$HOME/bin:$PREFIX/bin
export PATH


Quote:

The script builds avr-gcc-4.3.4 w. binutils2.20 and then avr-libc-1.6.8
The script now also automaticly builds avarice-2.10 and avrdude-5.9 , as per request of Jörg.

Note : gcc-4.3.x uses the GMP & MPFR libs , in order to function. So make sure to install the packets mentioned pre-reqs.txt

avr-insight is upgraded to ver 6.8 witch builds ok on 64-bit machines , and it has its own buildscript (buildinsight.sh) , as it takes ages to build.

Use: tar xvzf <filename> to extract it if it's a .tgz file, or unzip if it's a zipfile.

Just ansver yes if any of the scripts says that /usr/local/avr exists (ie. when building insight after gcc or the other way around.

But always delete /usr/local/avr before you are making a total/new rebuild.


Quote:

Updated the scriptfiles to build binutils and insight without the -Werror flag. This was caused by GCC 4.3.x (on Ubuntu 8.10) being unable to build the targets. And was due to a lot of new warnings being enabled by default.


Quote:

@20-jun-2009
Upgraded the "old" script building avr-gcc-4.2.2 to build avr-gcc-4.2.4 ... "Jörg did all the patches".
4.2.2 could produce more compact code in some cases.



Quote:

@14-jul-2009
Upgraded the script to build avr-libc-1.6.7 and avrdude-5.8 , no changes to avr-gcc.
As usual "Jörg & the others" did all the hard work.


Quote:

@12-aug-2009
Upgraded the avr-gcc-4.2.4 script to build avr-libc-1.6.7 and avrdude-5.8.
Also applied a "Hotfix patch" to binutils , to avoid a relocation error in the AVR25 architecture (tiny85 etc).
Everybody is urged to rebuild their toolchain


Quote:
@29-0ct-2009
Updated the avr-gcc-4.1.2 binutils 1-17 avr-libc-1.46
script , as it failed in makeinfo.
Moved the updated script to this post
http://www.avrfreaks.net/index.php?name ... 653#632653


Quote:
@03-Nov-2009
Updated the avr-gcc-4.3.3 script , with an avarice patch , to fix a problem when building with "native" gcc 4.4.1


Quote:
@01-Dec-2009
Made a Debian/Ubuntu ".deb" install package containing the binaries build with the above 03-Nov-2009 script.
Read more here
http://www.avrfreaks.net/index.php?name ... mp;t=86953


Quote:
@17-Dec-2009
Updated the ".deb" install package , w. a new avrdude binary , containing a PDI patch. (See .txt file in the download site)
Read more here
http://www.avrfreaks.net/index.php?name ... mp;t=86953


Quote:
@16-Jan-2010
Updated the avr-gcc-4.3.3 script , to build avrdude-5.9
Removed the two "interrim avrdude patches" , as 5.9 should fix that.
All other remains unchanged.
The script still includes the "AVR25 relocation fix" patch , and the avarice patch


Quote:
@18-Jan-2010
Updated the ".deb" install package (named 16-jan-2010) , w. avrdude-5.9. (See .txt file in the download site)
Read more here
http://www.avrfreaks.net/index.php?name ... mp;t=86953

Get the package here.
http://www.wrightflyer.co.uk/avr-gcc/


Quote:
@26-Jan-2010
Updated the scriptfiles and the ".deb" install package to 26-jan-2010 , Added avrdude-5.10 , all other unchanged.

Get the package here.
http://www.wrightflyer.co.uk/avr-gcc/


Quote:
@25-Feb-2010
Made a "Special Static" version , with the patches from WinAVR-20100110-install.exe , so it should be compatible.

Should be installable on both 32-bit & 64-bit versions.
See http://www.avrfreaks.net/index.php?name ... mp;t=90241

Get the package here.
http://www.wrightflyer.co.uk/avr-gcc/


Quote:
@09-Mar-2010
Updated the avr-gcc script , to build avr-gcc-4.3.4 and binutils-2.20.
Added 2 patches to avr-insight/avr-gdb.
Added a builtins.h file in the builddir , see readme for use

Added a package-versions file , now versions are only maintained in that file.
Added a new "automatic" way to patch binutils , gcc & insight.

Thanx to Jörg the linux (FreeBSD) build , now has the same patches as WinAVR-2010. A big thankyou to Jörg & EW.

Also uploaded as .deb package avr-gcc-4.3.4-avrfreaks-09-mar-2010.deb
Get the package here.
http://www.wrightflyer.co.uk/avr-gcc/


Quote:
@30-apr-2010
Rebuild the 09-mar-2010 packages on Ubuntu 10.04 LTS
This time i have a x64 system , so i build both 32bit (i386) and 64bit x64 packages.

Uploaded as .deb packages here
http://www.wrightflyer.co.uk/avr-gcc/
Only toolchain change is : Updated insight from 6.8 to 6.8-1


Quote:
@04-jun-2010
Updated buildscript to build avr-insight to 6.8-1
No other changes , and no new .deb's as the 30-apr deb's allready contains that.


Quote:
@12-sep-2011
Did a rebuild of the old trusty avr-gcc-4.3.4 toolchain , with avr-libc-1.7.1 and avrdude-5.11 - avr-insight has switched from 6.8-1 to 6.8-1a

Had to do a "kludge" in order to build avr-insight , ad the file is named 6.8-1a , but it extracts to 6.8-1 directory
Run ./repack-insight.sh , before ./buildinsight.sh

Removed all the rm -fr * , from the buildscript

See readme in zipfile

Also uploaded .deb files to http://www.wrightflyer.co.uk/avr-gcc/


Quote:
@20-sep-2011
Updated the 12-sep-2011 package (see install instructions there)

avrdude updated from 5.11 to 5.11.1 (Serious Bugfix)
avarice updated from 2.10 to 2.11 )minor compilation issues)

See readme in zipfile

Also uploaded .deb files to http://www.wrightflyer.co.uk/avr-gcc/


Quote:
@29-dec-2011
Updated the buildscript with the latest patches from the FreeBSD repos (Thanx Jörg)

avr-gcc updated to 4.5.1
avr-libc updated to 1.8.0
binutils updated to 2.20.1
avarice updated to 2.12
insight replaced with gdb 7.3.1

See readme in zipfile

More info & comments should go here
http://www.avrfreaks.net/index.php?name ... p;t=115567

05-jan-2012
Also uploaded .deb files to http://www.wrightflyer.co.uk/avr-gcc/


Quote:
@08-mar-2012
Updated the buildscript with suggestions/patches from Axel W. (Uracoli)
The suggestions makes the get-patches.sh script more secure , and improves on the buildavr-cleanup.sh script.

The resulting toolchain is the same as the 29-dec-2011 TC.

Thanx Axel.


Quote:
@26-feb-2013
Updated the buildscript with working file mirrors


Quote:
@30-nov-2013
Updated the buildscript to build :
avrdude 6.0.1 (Thanx Jörg)
avr-gdb 7.6.1


/Bingo
.
.
.


Last edited by Bingo600 on Nov 30, 2013 - 03:01 PM; edited 94 times in total
 
 View user's profile Send private message  
Reply with quote Back to top
dl8dtl
PostPosted: Oct 04, 2006 - 10:28 PM
Raving lunatic


Joined: Dec 20, 2002
Posts: 7370
Location: Dresden, Germany

This appears to have become an at least occasionally requested item.

Is there any interest of making this thread `sticky'?

(Please stop replying if you see there's an unanimous vote; I'll
have to split the thread otherwise to decouple the `noise' from
the actual content otherwise before making it sticky.)

_________________
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.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
knutbr
PostPosted: Oct 05, 2006 - 09:01 AM
Hangaround


Joined: Sep 22, 2004
Posts: 435
Location: Oslo, Norway

[quote="dl8dtl"]
Is there any interest of making this thread `sticky'?
[/quote]

I think that would be a good idea. In particular, I find the information about patches (and where to get them) very useful.
 
 View user's profile Send private message  
Reply with quote Back to top
Brewski
PostPosted: Oct 10, 2006 - 10:52 PM
Wannabe


Joined: Feb 27, 2001
Posts: 84
Location: Huntington, WV

I'm a relative newbie to Linux, used SUSE a little. Just today I installed UBUNTU. Looks like it will help me brake that bad Windose and commercial-Linux habit.

Have played around with WINAVR a little and like it. Would like to go to GNU GCC on Linux.

Making this thread sticky has my vote.

Mike
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Oct 16, 2006 - 06:37 PM
Raving lunatic


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

Just "Touching the date"

/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
ufechner
PostPosted: Nov 01, 2006 - 04:18 PM
Wannabe


Joined: Feb 13, 2003
Posts: 97
Location: Kiel, Germany

Hello,

compiling binutils with the your scripts failed for me with the following error message (using a current gentoo box with gcc 4.1.1):
Code:

gcc -DHAVE_CONFIG_H -I. -I../../../source/binutils-2.17/binutils -I. -D_GNU_SOURCE -I. -I../../../source/binutils-2.17/binutils -I../bfd -I../../../source/binutils-2.17/binutils/../bfd -I../../../source/binutils-2.17/binutils/../include -I../../../source/binutils-2.17/binutils/../intl -I../intl -DLOCALEDIR="\"/usr/local/avr/share/locale\"" -Dbin_dummy_emulation=bin_vanilla_emulation   -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -c ../../../source/binutils-2.17/binutils/wrcoff.c
cc1: warnings being treated as errors
../../../source/binutils-2.17/binutils/wrcoff.c: In Funktion coff_start_struct_type:
../../../source/binutils-2.17/binutils/wrcoff.c:2277: Warnung: berechneter Wert ist unbenutzt
make[4]: *** [wrcoff.o] Fehler 1
make[4]: Leaving directory `/usr/local/avr/build/binutils-2.17/binutils'
make[3]: *** [all-recursive] Fehler 1
make[3]: Leaving directory `/usr/local/avr/build/binutils-2.17/binutils'
make[2]: *** [all] Fehler 2
make[2]: Leaving directory `/usr/local/avr/build/binutils-2.17/binutils'
make[1]: *** [all-binutils] Fehler 2
make[1]: Leaving directory `/usr/local/avr/build/binutils-2.17'
make: *** [all] Fehler 2
(./buildavr-no-insight.sh) binutils build failed



Any idea?

Regards:

Uwe Fechner
 
 View user's profile Send private message Visit poster's website 
Reply with quote Back to top
dl8dtl
PostPosted: Nov 01, 2006 - 04:28 PM
Raving lunatic


Joined: Dec 20, 2002
Posts: 7370
Location: Dresden, Germany

Drop the -Werror. I'm not going to do anything about the COFF patch
anymore, given that AVR-COFF is close to be dead.

_________________
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.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
monmon
PostPosted: Dec 28, 2006 - 10:08 PM
Newbie


Joined: Dec 11, 2006
Posts: 6


Hello,

thank you very mutch. Your script run successfully with Mandriva 2005. I made a little remark, it don't run with Mandriva 2007. There are some errors with "binutils build failed" message.

Regards.

Monmon Very Happy
 
 View user's profile Send private message  
Reply with quote Back to top
prestby
PostPosted: Jan 03, 2007 - 08:18 PM
Newbie


Joined: Nov 09, 2005
Posts: 2


Hi,

Is there an easy way to drop the -Werror using the script? It fails on a ubuntu 6.10 and I have tried to remove the -Werror but somehow it pops back again...

/Mikael
 
 View user's profile Send private message  
Reply with quote Back to top
dl8dtl
PostPosted: Jan 04, 2007 - 04:22 PM
Raving lunatic


Joined: Dec 20, 2002
Posts: 7370
Location: Dresden, Germany

> Is there an easy way to drop the -Werror using the script? It fails
> on a ubuntu 6.10 ...

"Is there a way to get rid off these seat belts? They are always in
my way."

The correct solution is not to remove the -Werror but to remove the
warning triggering your problem. Not having Ubuntu Linux, and you not
quoting it, I can only guess, but I assume it's:

wrcoff.c: In function 'coff_start_struct_type':
wrcoff.c:2277: warning: value computed is not used

FreeBSD's CVS version recently also switched to GCC 4.x, and thus also
stumbled across that one.

I have just updated the COFF patch for this in my FreeBSD port. The
solution was much simpler than your attempt to get rid of the -Werror:
a "(void)" cast had to be placed before a function call that returned
a value that was not used. (Upon thinking of it, I'm asking myself
whether ignoring the return value is actually the right thing to do,
but at least, it's been that way all the time, and I don't really see
the Big Picture of all this anymore after that many years.)

I also updated the ATmega256x patch in binutils to get rid of that
annoying "operation is dangerous with linker stubs" warning that was
triggered by large C switch() statements. In a discussion with Bjrn
Haase, we agreed that this was a regression (it wasn't really
dangerous in the switch() situation anyway), and also not all that
useful as Bjrn initially believed, as there are many more other ways
to shoot into your feet with the linker stubs which cannot be warned
about anyway. So that warning is gone now. (This matches the patch
Eric is using for his most recent WinAVR.)

_________________
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.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
prestby
PostPosted: Jan 04, 2007 - 07:25 PM
Newbie


Joined: Nov 09, 2005
Posts: 2


Thanks Jrg!

The void cast did the trick in Ubuntu 6.10 as well.

/Mikael
 
 View user's profile Send private message  
Reply with quote Back to top
swinchen
PostPosted: Mar 29, 2007 - 07:12 PM
Rookie


Joined: Mar 27, 2007
Posts: 43


This script worked flawlessly on Arch linux.


Any hints on how build avr-insight, and/or avr-gdb?

Thanks,
Sam

EDIT

I am sorry, that didn't really follow http://www.catb.org/~esr/faqs/smart-questions.html

What I should say is that I have a difficult time determining what the latest stable package is. Right now I am building Insight 6.6.

Code:

./configure --prefix=/home/swinchen/opt/avr-insight --target=avr


I am just not sure if I will run into any problems with this version.

Thanks Again,
Sam
 
 View user's profile Send private message  
Reply with quote Back to top
outer_space
PostPosted: Apr 07, 2007 - 09:49 PM
Resident


Joined: Mar 22, 2005
Posts: 996
Location: S. Florida

Would it be a problem, for the purpose of consistency, to alter this script to install in the gcc directory (/usr/lib/gcc/gcc-4.1 not sure) along with the i486 target and the arm-elf target?

Thanks,
outer_space
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: Apr 10, 2007 - 10:43 AM
Raving lunatic


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

outer_space wrote:
Would it be a problem, for the purpose of consistency, to alter this script to install in the gcc directory (/usr/lib/gcc/gcc-4.1 not sure) along with the i486 target and the arm-elf target?

Thanks,
outer_space


Maybe like this ??
Quote:

3: If desired edit the buildavr-no-insight.sh file , to change the prefix .. default is : prefix=/usr/local/avr


the prefix , is pointing to the final "Install dir"

/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
outer_space
PostPosted: Apr 10, 2007 - 05:47 PM
Resident


Joined: Mar 22, 2005
Posts: 996
Location: S. Florida

I mean to suggest altering the script to make it consistent with native and arm prefixes so all three end up in the same spot (for everybody)
 
 View user's profile Send private message  
Reply with quote Back to top
lfmorrison
PostPosted: Apr 10, 2007 - 05:56 PM
Raving lunatic


Joined: Dec 08, 2004
Posts: 4721
Location: Nova Scotia, Canada

I seem to recall having read that once upon a time the /usr/local/avr prefix was chosen so that it would be a simple matter of blowing away the entire directory to get rid of *everything* AVR-related from the filesystem without worrying about:
1) Accidentally removing anything non-AVR-related in the same operation
2) Accidentally losing track of some AVR components and orphaning them

I'm sure there are better ways to accomplish both of these tasks nowadays though.
 
 View user's profile Send private message  
Reply with quote Back to top
dl8dtl
PostPosted: Apr 10, 2007 - 09:20 PM
Raving lunatic


Joined: Dec 20, 2002
Posts: 7370
Location: Dresden, Germany

> I'm sure there are better ways to accomplish both
> of these tasks nowadays though.

Only if you are carefully tracking the files you did install.
That's where the package management systems of the various Unix
systems come into the game. If you are installing something
outside of these package managers, you have to track that
yourself.

Each of the tools should also come with a Makefile target
"make uninstall", but I wouldn't hold my breath to see whether
they are really removing everything (including perhaps empty
directories they once created): these targets probably belong
to the lesser tested features even if they come "for free"
along with autoconf/automake.

_________________
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.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
coldtobi
PostPosted: Apr 21, 2007 - 12:07 PM
Rookie


Joined: Sep 08, 2003
Posts: 36
Location: Germany

If somenone wants to build packages for installation using the debian packaging system, I wrote a mini how-to:

http://blog.coldtobi.de/index.php?op=Vi ... p;blogId=1

Enjoy!

(The patches are also filed against the debian packages, for your reference, these are the bug numbers:
#420061 #416924 )
 
 View user's profile Send private message  
Reply with quote Back to top
Bingo600
PostPosted: May 15, 2007 - 09:16 PM
Raving lunatic


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

Just touching the date , to indicate the new avr-libc-1.4.6 build

/Bingo
 
 View user's profile Send private message  
Reply with quote Back to top
monmon
PostPosted: Jun 06, 2007 - 05:49 PM
Newbie


Joined: Dec 11, 2006
Posts: 6


Hi,

I change my PC and now I installed Ubuntu 7.04. The script work perfectly with my old PC and Mandrake 2005 (not with 2007).

AVR-GCC package download don't work on tiny45. Then I want compile this version and patches (tiny45) but ./configure indicate : "C compiler cannot create executables". I try different options but there is always this error Embarassed.

Thank for your help and for all Ubuntu users.

Monmon.
(Celeron 2500 + Ubuntu 7.04 + Tiny45 + Kontrollerlab)
 
 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