Getting avr32-linux-gcc compiler on linux

If you’re trying to compile C programs for Linux on an AVR32 architecture, you’re going to have to get the avr32-linux-gcc cross compiler. Note that you can’t use the avr32-gcc compiler, as this compiler makes programs which do not run on an operating system (ie: they talk to the system directly), which will not run in linux.

Anyway, there are a surprising number of bad and/or wrong tutorials for getting this compiler. Here’s a short and sweet one which actually works.

Download the AVR32 buildroot from here. It’s about 7MB. Extract this, open a terminal window and navigate to the directory where you extracted it.

Now type the following:

make atngw100_defconfig
make atngw100-base_defconfig
make source
make -i

You may be prompted to install a few packages before the final make will work. Install them. They’re not dangerous.

Once that’s done, and the final make could take half an hour or more, you’ll have a bunch of utilities to use. Including avr32-linux-gcc, which can be found in [buildroot_directory]/build_avr32/staging_dir/bin

Leave a Reply

Your email address will not be published.