LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   AVR development toolchai (https://www.linuxquestions.org/questions/linux-software-2/avr-development-toolchai-798564/)

ruzvay 03-29-2010 01:55 AM

AVR development toolchai
 
Hi,
I am trying to install the toolchain for atmel's microcontrollers
I am following this link http://www.nongnu.org/avr-libc/user-...nstall_avr_gcc to install the softwares.

But i am having difficulty installing AVR LIBC,
Quote:

bash-3.1# ./configure --build='./config.guess' --host=avr --prefix=/usr/local/avr
checking build system type... Invalid configuration `./config.guess': machine `./config.guess' not recognized
configure: error: /bin/sh ./config.sub ./config.guess failed
BTW: I have already installed BINUTILS and AVR GCC

knudfl 03-29-2010 04:03 AM

Quote:

bash-3.1# ./configure
Two things are totally different from the instructions.
1) The sign $ means building as an unprivileged user.
Using root ( # ) is asking for trouble.
The only allowed root command is # make install.

Recommended directory for building software is /home/'name'/<dir>
e.g. /home/ruzvay/tmp/

2) A build directory is required for binutils, gcc, glibc.
Preferrable outside the application.
Hence the two periods : ../configure --<option>
( The instructions use the name 'avr-obj' for build-directory.)

Starting with an empty /home/ruzvay/tmp/ :
a) cd tmp/
b) mkdir build-binutils
c) tar xvf <path-to> binutils-<version>
d) cd build-binutils/ ( which is empty.)
e) ../binutils-<version>/configure --<option> --<option>

Better delete, what you have done so far. If no build-directory
was used for binutils, gcc. Binutils may work or may not.
GCC will not be usable for anything.
.....

P.S. : The only recommended tool chain, I know, is crosstool-NG
http://ymorin.is-a-geek.org/dokuwiki/projects/crosstool
http://ymorin.is-a-geek.org/dokuwiki...load_and_usage
hg clone http://ymorin.is-a-geek.org/hg/crosstool-ng
The package 'mercurial' providing /usr/bin/hg is required.
'crosstool-NG' is continiously maintained.
Last update : two weeks ago.
http://www.linuxquestions.org/questi...12-a-798457/#2
> > post # 2, @ theNbomr is a crosstool expert.
.....

ruzvay 03-29-2010 12:35 PM

thanx knudfl!!!

however I am unable to uninstall the previous installation of binutils and avr-gcc!!
I used make uninstall in the compiling folders which did not work.

later i tried the following in AVR Libc folder
Quote:

bash-3.1# ./config.guess
i686-pc-linux-gnu
bash-3.1# ./configure --build=i686-pc-linux-gnu --host=avr --prefix=/usr/local/avr
checking build system type... i686-pc-linux-gnu
checking host system type... avr-unknown-none
checking if configuring for cross compile... yes
checking if target host is avr... yes
checking for a BSD-compatible install... /bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for avr-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet
checking for avr-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for avr-as... no
checking for as... as
checking dependency style of gcc... gcc3
checking for avr-ranlib... no
checking for ranlib... ranlib
checking for avr-ar... no
checking for ar... ar
configure: error: Wrong C compiler found; check the PATH!
bash-3.1#
I then pasted the Avr-Libc folder to gcc source folder!! and tried to reconfigure it from /gcc-4.4.3/obj-avr folder.
Quote:

bash-3.1# ../configure --build=i686-pc-linux-gnu --host=avr --prefix=/usr/local/avr
checking build system type... i686-pc-linux-gnu
checking host system type... avr-unknown-none
checking target system type... avr-unknown-none
checking for a BSD-compatible install... /bin/ginstall -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for avr-gcc... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for avr-g++... no
checking for avr-c++... no
checking for avr-gpp... no
checking for avr-aCC... no
checking for avr-CC... no
checking for avr-cxx... no
checking for avr-cc++... no
checking for avr-cl... no
checking for avr-FCC... no
checking for avr-KCC... no
checking for avr-RCC... no
checking for avr-xlC_r... no
checking for avr-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for avr-gnatbind... no
checking for gnatbind... gnatbind
checking for avr-gnatmake... no
checking for gnatmake... gnatmake
checking whether compiler driver understands Ada... yes
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... yes
checking for correct version of mpfr.h... buggy but acceptable
checking for version 0.10 of PPL... no
checking for correct version of CLooG... no
The following languages will be built: c,c++,fortran,java,objc
*** This configuration is not supported in the following subdirectories:
target-libmudflap target-libgomp target-libiberty target-libstdc++-v3 target-libffi target-zlib target-libjava target-libssp target-libada gnattools target-boehm-gc
(Any other directories should still work fine.)
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... expect
checking for runtest... no
checking for avr-ar... no
checking for avr-as... no
checking for avr-dlltool... no
checking for ld... (cached) /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin/ld
checking for avr-ld... (cached) /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin/ld
checking for avr-lipo... no
checking for avr-nm... no
checking for avr-ranlib... no
checking for avr-strip... no
checking for avr-windres... no
checking for avr-windmc... no
checking for avr-objcopy... no
checking for avr-objdump... no
checking where to find the target ar... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target as... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target cc... pre-installed
checking where to find the target c++... pre-installed
checking where to find the target c++ for libstdc++... pre-installed
checking where to find the target dlltool... pre-installed
checking where to find the target gcc... pre-installed
checking where to find the target gcj... pre-installed
checking where to find the target gfortran... pre-installed
checking where to find the target ld... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target lipo... pre-installed
checking where to find the target nm... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target objdump... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target ranlib... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target strip... pre-installed in /usr/lib/gcc/i486-slackware-linux/4.2.4/../../../../i486-slackware-linux/bin
checking where to find the target windres... pre-installed
checking where to find the target windmc... pre-installed
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether -fkeep-inline-functions is supported... yes
configure: creating ./config.status
config.status: creating Makefile
bash-3.1# make
make[1]: Entering directory `/home/ruzvay/gcc-4.4.3/obj-avr'
Configuring in ./fixincludes
configure: loading cache ./config.cache
configure: error: `host_alias' has changed since the previous run:
configure: former value: `i686-pc-linux-gnu'
configure: current value: `avr'
configure: error: in `/home/ruzvay/gcc-4.4.3/obj-avr/fixincludes':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over
make[1]: *** [configure-fixincludes] Error 1
make[1]: Leaving directory `/home/ruzvay/gcc-4.4.3/obj-avr'
make: *** [all] Error 2
bash-3.1#
I tried configuring everything with non root user mode!! but the permission was denied.

knudfl 03-29-2010 04:44 PM

The source files used for some earlier or unsuccessful
builds cannot be reused. You will have to delete everything.
Files that were handled by root, must be deleted as root.
And then start from scratch.

Some packages have no uninstall function ( # make uninstall ).
You must find where you installed the files, if you want them removed.
And then just delete them.

About ../configure not finding avr-gcc, avr-g++, etc.
http://www.nongnu.org/avr-libc/user-...ools.html#path
You are probable forgetting to set or export the path to e.g.
/usr/local/avr/gcc/ . ( ../configure CC=avr-gcc CXX=avr-g++ , can also
be used if you include the full path.)
.....
.....
Still : The only recommended toolchain is 'crosstool-NG',
which includes avr.
.....


All times are GMT -5. The time now is 12:13 AM.