AVR32 linux toolchain

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

Hi there,

I remember that long time ago it was possible to add a repository on the host linux machine and simply do an apt-get in order to get the avr32-linuxgcc compiler (plus the rest of the utils in the toolchain).

At this point of time, it seems that I have to make a full buildroot in order to get the toolchain.

Am I right? Is there a possible way to download the avr32-linux toolchain without making the buildroot?

Cheers

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

The only option is Buildroot, the binary release is removed and/or no longer maintained.

Don't use the binary release if you should stumble upon it, it has numerous bugs which have been fixed in the toolchain generated by Buildroot.

Hans-Christian

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

Hi hce, thanks for your reply.

I have already the toolchain up and running, the thing is that I want to give it to my group mate (school project) so he will not have to run buildroot. Can I simply copy my toolchain folder and paste it in his computer? will that work?

cheers

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

What I typically do if I want to deploy it, is to build to /opt/avr32-linux. You can do that in Buildroot by providing O=/opt/avr32-linux (or whatever you prefer). That will make it more consistent moving it around on various machines. Hopefully all your machines are either x86_64 or x86 (-; If not, you'll need to build two variants, 32-bit and 64-bit.

Hans-Christian

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

Very good! I will proceed as you explained, thanks for the suggestions.

I am wondering why nobody has generated toolchains and make them available for download, so people don't have to go through the nightmare of buildroot :D The same for the filesystem images...

Cheers

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

Nice suggestion.
My feelings are exactly the same as those of gallacticasd.
I am a PhD student and do not have much spare time for building buildroot-avr32-v3.0.0. Also I am not an expert in Ubuntu . I have spent more than two weeks on building buildroot-avr32-v3.0.0 for NGW100. But with no success yet.

Actually I am working on JBIG image compression. Its C++ library is available at
http://tpgit.github.com/UnOfficialLeptDocs/.
I want to compile JBIG2 library for NGW100. Till now I am unable to do it due to of lack of Linux expertise, because mostly I am working with FPGAs.
I am very much frustrated.........

So, hce please build buildroot-avr32-v3.0.0 for NGW100 as you suggested above ( I have quoted your suggestion below)

Quote:

You can do that in Buildroot by providing O=/opt/avr32-linux

And make it available to everyone (if you have time), who just want to use it.

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

khurshid_coms wrote:
mostly I am working with FPGAs.

That's interesting, what sort of work are you doing with these?

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

Quote:
I have spent more than two weeks on building buildroot-avr32-v3.0.0 for NGW100. But with no success yet.

I have buildroot up and running, which problems are you facing exactly? May be I can help you.

Cheers

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

Thank you both gallacticasd and rsx11m for such a quick response.

I have explained my problems at the following post at avrfreks but then no one is responding to those problems there and rsx11m previously suggested me avoid opening new posts.

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

The main problem I am facing now is with mirror site.

I followed the suggestions of rsx11m from one of his post for changing mirror site but then I got the following problem.

Resolving www.at91.com... 217.16.6.11
Connecting to www.at91.com|217.16.6.11|:21... connected.
Logging in as anonymous ...

It stucked at this point and then automatically continued after long time. But when finished then my C++ project is not working with it.

My C++ project is showing the following error (Please note that my C++ project is compiling with g++ but not compiling with avr32-linux-g++)

root@khursheed-desktop:~/Build/EXE_Ubuntu/jbig2encoder# make
avr32-linux-g++ -o jbig2 jbig2.cc -L. -ljbig2enc /usr/local/lib//liblept.a -I/usr/local/lib//src -Wall -I/usr/include -I/usr/local/include/leptonica -I./ -L/usr/lib -O3 -lpng -ljpeg -ltiff -lm -lz
In file included from /home/khukhu/Build/buildroot-avr32-v3.0.0/output/staging/usr/bin-ccache/../lib/gcc/avr32-unknown-linux-uclibc/4.2.4/../../../../avr32-unknown-linux-uclibc/include/c++/4.2.4/iosfwd:45,
from /home/khukhu/Build/buildroot-avr32-v3.0.0/output/staging/usr/bin-ccache/../lib/gcc/avr32-unknown-linux-uclibc/4.2.4/../../../../avr32-unknown-linux-uclibc/include/c++/4.2.4/bits/stl_algobase.h:70,
from /home/khukhu/Build/buildroot-avr32-v3.0.0/output/staging/usr/bin-ccache/../lib/gcc/avr32-unknown-linux-uclibc/4.2.4/../../../../avr32-unknown-linux-uclibc/include/c++/4.2.4/vector:66,
from jbig2.cc:18:
/home/khukhu/Build/buildroot-avr32-v3.0.0/output/staging/usr/bin-ccache/../lib/gcc/avr32-unknown-linux-uclibc/4.2.4/../../../../avr32-unknown-linux-uclibc/include/c++/4.2.4/avr32-unknown-linux-uclibc/bits/c++locale.h: In function 'int std::__convert_from_v(int* const&, char*, int, const char*, ...)':
/home/khukhu/Build/buildroot-avr32-v3.0.0/output/staging/usr/bin-ccache/../lib/gcc/avr32-unknown-linux-uclibc/4.2.4/../../../../avr32-unknown-linux-uclibc/include/c++/4.2.4/avr32-unknown-linux-uclibc/bits/c++locale.h:111: error: 'vsnprintf' is not a member of 'std'

Please help me in this problem

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

Ok, lets try to get the mirror thing fixed first.

Whenever a software package is not downloading you will get an error and buildroot will stop (if it is not stopping and it keeps retrying pres Ctrl+C and stop the build manually).

Solution:
Check the name of the software package that cannot be downloaded and go to http://www.atmel.no/buildroot/source/mirror/ download exactly the same version that is required by buildroot. If the sources are not available there look for the same version in sourceforge or google code. Download them to your linux box.
Move the sources you have just downloaded to the folder dl in the buildroot directory.

Resume the compilation by typing make sources.

This always fixes the problem of failing downloads. If you do this, Buildroot will see the required sources in the dl folder, therefore it will avoid downloading them again.

Buildroot is continuing because it is skipping the package you are trying to download. I assume that this package has some libraries you need for your project and the whole thing is crashing when you are compiling it.

Cheers

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

Thank you gallacticasd.
I will try this method now. hce also suggested this kind of method but it was not clear to me for where to place the download file. Now you cleared to to place it in dl folder.

thank you once again. please be with me till the end of build process.

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

Go ahead and try the build with manual download of the packages.

I will try to help you with it.

Cheers.

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

Now I foollowed your suggestions. Each time when it stucked at some downloading then I stoped it and download that package and placed it in dl folder.and then run make again. I did it few times.
But now at the end I got following error message

zutil.lo -lc -L/home/khukhu/buildroot-avr32-v3.0.0/output/staging/lib -L/home/khukhu/buildroot-avr32-v3.0.0/output/staging/usr/lib -L. libz.a
avr32-unknown-linux-uclibc-gcc: libz.a: No such file or directory
make[1]: *** [libz.so.1.2.5] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/home/khukhu/buildroot-avr32-v3.0.0/output/build/zlib-1.2.5'
make: *** [/home/khukhu/buildroot-avr32-v3.0.0/output/build/zlib-1.2.5/.stamp_built] Error 2

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

Do you have the directory /home/khukhu/buildroot-avr32-v3.0.0/output/staging/usr/lib created? If not create it manually (by executing mkdir and then the path).

try executing ./configure and then make again.

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

Yes I have this directory.
But libz.so.1.2.5 is not there in lib and maybe the error is due to it.
make[1]: *** [libz.so.1.2.5] Error 1

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

libz.a is available in
/home/khukhu/buildroot-avr32-v3.0.0/output/build/zlib-1.2.5
but libz.so.1.2.5 is not available

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

libz.so is a compiled library (dynamically linked). It has to be something generated from buildroot. What I would do is to execute make clean and let it start from the beginning.

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

I executed make again and now it showed the following error

gzip: /home/khukhu/buildroot-avr32-v3.0.0/dl/fakeroot_1.9.5.tar.gz: not in gzip format
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
make: *** [/home/khukhu/buildroot-avr32-v3.0.0/output/build/host-fakeroot-1.9.5/.stamp_extracted] Error 2
khukhu@khursheed-desktop:~/buildroot-avr32-v3.0.0$

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

Solved
This time it is successful and showed the following message

Build completed successfully

This time I downloaded /fakeroot_1.9.5.tar.gz and placed it in dl. Then run make. and it is successful
Many many thanks to gallacticasd. I really appreciate his patience and input. He solved my two weeks problem in just about four hours.
gallacticasd please tell me if you have more time (today, tomorrow or at the weekend). I want to upgrade the firmware of my NGW100 with this new image.
Last year I tried to upgrade it but then I faced some problem and then I did not find time for upgrading.
Now I must do it and I have patience for it.

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

Very good! and you are welcome!

The next thing, deploying the image. This should be relatively easy, you have already done the complicated part.

In order to deploy to the sd card, take a look at this page of the wiki:

http://www.avrfreaks.net/wiki/index.php/Documentation:AVR32_Linux_Development/Programming_an_SD_card_with_the_AVR32_Linux_file_system

It is quite complete. I followed the process the day before yesterday and the documentation in this case seems to be up to date.

Just drop a line if I can be helpful.

Cheers

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

Now I tried to compile my C++ and showed me the following error

/home/khukhu/buildroot-avr32-v3.0.0/output/staging/usr/lib/gcc/avr32-unknown-linux-uclibc/4.2.4/../../../../avr32-unknown-linux-uclibc/include/c++/4.2.4/avr32-unknown-linux-uclibc/bits/c++locale.h:111: error: 'vsnprintf' is not a member of 'std'

During compilation of buildroot, I saw vsnprintf at some point. Maybe by default vsnprintf is disabled in compiling buildroot.
So, please share if anyone knows about vsnprintf and whether it is supported in buildroot or not.

Please note that my C++ project is standard JBIG2 library for compression. I have compiled this library and used it from Ubuntu terminal and its working perfectly.So, there is no problem with JBIG2.

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

Now I tried to compile my C++ project and it showed me the following error.

/home/khukhu/buildroot-avr32-v3.0.0/output/staging/usr/lib/gcc/avr32-unknown-linux-uclibc/4.2.4/../../../../avr32-unknown-linux-uclibc/include/c++/4.2.4/avr32-unknown-linux-uclibc/bits/c++locale.h: In function 'int std::__convert_from_v(int* const&, char*, int, const char*, ...)':
/home/khukhu/buildroot-avr32-v3.0.0/output/staging/usr/lib/gcc/avr32-unknown-linux-uclibc/4.2.4/../../../../avr32-unknown-linux-uclibc/include/c++/4.2.4/avr32-unknown-linux-uclibc/bits/c++locale.h:111: error: 'vsnprintf' is not a member of 'std'
make: *** [jbig2] Error 1

Note: I saw 'vsnprintf' during the compilation of buildroot.
Maybe the support for 'vsnprintf' is off by default and we need to enable 'vsnprintf' using menu config.

Please comment on it if someone knows how to enable 'vsnprintf' using menu config before running make.

My C++ project is a standard JBIG2 compression Library and is available at

http://tpgit.github.com/UnOfficialLeptDocs/leptonica/README.html#jbig2-encoder

I compiled this JBIG2 library in Ubuntu terminal and then compressed many images using it. So it is fully functional. Now I want to compile it for NGW100 and compress images using it on NGW100.

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

Before deploying the linux image, I want to upgrade the firmware of my NGW100. I tried the following command on the terminal

sudo avr32program erase -fcfi@0

and it showed me the error
sudo: avr32program: command not found

Why no one is responding to my questions?
Am I violating the rules or asking too much simple question?
I am really in big problem, totally confused and very much frustrated.............
please help me.