AVR-GCC and XMEGA

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey all
I'm kinda new to the Linux scheme, so this is probably just something stupid, but I am having issues getting some basic code to compile for an xmega128a1
/usr/lib/gcc/avr/4.5.1/../../../../avr/include/avr/io.h:422:6: warning: #warning "device type not defined"
It prints out a list of supported devices, and no xmegas are listed.

I run Fedora. yum info tells me that:
avr-gcc version is 4.5.1
avr-libc version is 1.7.0
avrdude version 5.10

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

You must provide -mmcu=atxmega128a1 to the avr-gcc compiler. If the compiler doesn't list any XMEGA devices, then it is old and you should update it. Debian and Ubuntu has the latest and greatest with regards to avr-gcc ;)

Hans-Christian

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

Get yourself a copy of Mfile then just set "MCU = atxmega128a1"

Quote:
Debian and Ubuntu has the latest and greatest with regards to avr-gcc

That's true if you download your .deb from my website which holds the packages built by Bingo600:

www.wrightflyer.co.uk/avr-gcc/

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

Took a bit of work, but I got uninstalled avr-gcc, Bingo's scripts to work, and now it compiles just fine. The makefile was just fine, it was just avr-gcc that wasn't working right. Thanks for the help

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

Yup, this proves once again how rubbish the various distribution repository versions are.

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

clawson wrote:
Yup, this proves once again how rubbish the various distribution repository versions are.
Debian and Ubuntu's packages has treated me well for years :)

Hans-Christian

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

Take a look at their patch list - I'll bet it's missing some of the important ones that are pulled in by Bingo's script and used by Joerg and Eric in building toolchains.