EmbDev.net

Forum: µC & Digital Electronics Did anybody ever succeed in compiling Atmels patched avr-gcc?


von matrixstorm (Guest)


Rate this post
useful
not useful
Hi commumity.

Did anybody ever succeed in compiling Atmels patched toolchain from 
sources:

http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.4.3/

(Obviously Atmel has, since their x86 binaries are operational.)

It seems so full of (intentional?) bugs.
Even starting with binutils, there are declarations missing...

Does anybody have some ideas? Is there some other URL with patchfiles?

Thanks to all of you.

BR matrixstorm

von Achim K. (aks)


Rate this post
useful
not useful
I also tried it under Ubuntu 12.04 for Toolchain 3.4.3 ...
and gave up without success :-).

von matrixstorm (Guest)


Attached files:

Rate this post
useful
not useful
Hi again.

I was lucky enough to get binutils patched, finally.
(I attach my patch here.)

However it remains a mystery to get the gcc or even their patched 
avrlibc compiled.

For any suggestions I would be really helpful.
Otherwise a shitstorm would be ok, too.
At least then I know I am not the only/ a completly twit.

BR matrixstorm

von batchman (Guest)


Attached files:

Rate this post
useful
not useful
Using mingw32 on XP(SP3), I found several reasons causing the 
compilation to fail, but finally the build runs through.
http://www.nongnu.org/avr-libc/user-manual/install_tools.html gives some 
useful information about a manual building process and lists required 
programs.

a) mingw basic setup
Download the current release of mingw using the installer
http://downloads.sourceforge.net/project/mingw/Installer/mingw-get-setup.exe
(installation path should not contain blanks; I've used F:\mingw)

Basic Setup - checked
mingw-developer-toolkit
mingw32-base
mingw32-gcc-g++
mingw32-gcc-ada
msys-base

All Packages - checked additionally
msys-gzip

All Packages - uncheck (in need of another version)
mingw32-autoconf2.5

b) mingw modifications
Create \mingw\msys\1.0\etc\fstab to reflect the actual installation 
path. See http://www.mingw.org/wiki/Getting_Started

Replace F:\mingw\var\lib\mingw-get\data\mingw32-autoconf.xml with the 
version attached or change it manually to point to autoconf2.5-2.64-1.

Using a newer version is the primary error source while creating 
avr-binutils. Changing some path variables (like for other problems) 
would probably fix it too, but the script insists on using 2.63/2.64.
Check in mingw32-autoconf2.5 using mingw-get.exe again.

Create a shortcut to F:\mingw\msys\1.0\msys.bat

c) Install prerequisite programs
pdflatex epstopdf
I've used 
http://mirrors.ctan.org/systems/win32/miktex/setup/basic-miktex-2.9.5105.exe
Using the installer automaticly expands the windows path variable.
tex\latex\listings\listings.sty
tex\latex\xcolor\xcolor.sty
tex\latex\colortbl\colortbl.sty
tex\latex\url\url.sty
tex\latex\fancyhdr\fancyhdr.sty
tex\latex\sectsty\sectsty.sty
tex\latex\tocloft\tocloft.sty
tex\context\base\supp-pdf.mkii
fonts\tfm\adobe\symbol\psyr.tfm
will be downloaded on first use.


pngtopnm and various other conversion tools
Tired of fumbling around with installations, I simply extracted the 
w32-binaries from
http://sourceforge.net/projects/gnuwin32/files/netpbm/10.27/
netpbm-10.27-bin.zip and netpbm-10.27-dep.zip respectively.
and put them together in newly-created /usr/local/bin 
(F:\mingw\msys\1.0\local\bin)

fig2dev
xttp://www.winfig.com/WinFIG-Dateien/WinFIG304.zip
Extracted gdiplus.dll and fig2dev.exe to /usr/local/bin

doxygen
ftp://ftp.stack.nl/pub/users/dimitri/doxygen-1.7.1.windows.bin.zip
Extracted doxygen.exe and doxytag.exe to /usr/local/bin

ghostscript
I'd already installed version 9.02, seems working
(no problem with dir containing blanks)


d) Setup the sources
xttp://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain/3.4. 
3/SOURCES.README
I've used F:\mingw\msys\1.0\home\username\avr as base directory. Below 
there are
./build, ./install, ./source, ./source/headers, ./source/gmp, 
./source/mpfr and ./source/mpc containing the tarballs.
xttp://ftp.gnu.org/gnu/gmp/gmp-5.0.2.tar.gz
xttp://ftp.gnu.org/gnu/mpfr/mpfr-3.0.0.tar.gz
xttp://www.multiprecision.org/mpc/download/mpc-0.9.tar.gz

e) Modify the installation script.
All further problems (*) are caused by using absolute paths, which are 
not supported in all cases.
Simply changing all variables ($srcdir, $builddir, $LIB_DIR...) to 
either "/home/username", "F:/mingw/msys/1.0/home/username" or 
"/f/mingw/msys/1.0/home/username" leads to unexpected behavior in 
otherwise working parts.
Also, using strictly relative paths would require too much changes.
Thus introducing a new variable srcdirw=$(cd ${srcdir}; pwd -W) used by 
previously failing configure calls works well.
There are discussion about this topic in general, some of them 
discourage the use of pwd -W, but who cares. I'm not convinced that this 
longstanding problem would be ever solved by the root, because there are 
a lot of compatibility issues in executables, scripts and the m4 macro 
processor.

So use the attached version copied to ~/avr, cd to this dir and start 
the build process.
$ sh build-avr8-gnu-toolchain-git-msys.sh -b ./build -p ./install -s 
./source
Depending on your hardware, this could take serveral hours.

(*)
gcc_build_full(), gcc_build_bootstrap() -> fails during build
build/gengtype.exe  \
                    -S /home/username/avr/source/gcc/gcc -I 
gtyp-input.list -w tmp-gtype.state
/home/username/avr/source/gcc/gcc/../libcpp/include/line-map.h: No such 
file or directory
even if the file is available.

gmp_build() -> fails at configure
checking size of mp_limb_t... 0
configure: error: Oops, mp_limb_t doesn't seem to work

von funlw65 (Guest)


Rate this post
useful
not useful
Why not just using their avr toolchain for Linux? If there is so much 
trouble, personally I prefer to let Atmel doing that job. I just 
download, install and use :) .

von matrixstorm (Guest)


Rate this post
useful
not useful
Thx batchman.

Using my binutils patches I finnaly managed to compile the rest of the 
toolchain, too.


funlw65 wrote:
> Why not just using their avr toolchain for Linux?

Perhaps because Atmels toolchain is limited to x86(_64)?

And I would like it to have it on some other CPU arch ( no, not ARM ;-) 
)

BR matrixstorm

Please log in before posting. Registration is free and takes only a minute.
Existing account
Do you have a Google/GoogleMail account? No registration required!
Log in with Google account
No account? Register here.