atmega4809 and avr-libc

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

Hi all,

 

I just got a m4809 and wantes to write my first lines of code, when in realized, that avr-libc does not support these avrxmega3 devices.

 

Any hints where to get or how to create the right version of libc / libm?

 

Thanks, 

 Wilhelm

 

Last Edited: Wed. Oct 24, 2018 - 11:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You HAVE to get your stuff from Microchip not the GNU/FSF version of GCC because Atmel/Microchip are always months/years ahead of the mainline in their device support. Note also that their generic copy of AVR-LibC may not even support 4809 but that you will likely have to use "device packs" to get the 4809 support you require.

 

Bottom line: start with a Google for "Atmel Toolchain for Linux". If it is Windows you are using simply get AS7 and it comes with everything you need.

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

Well, I normally use g++-8.2 because I use modern C++ with all features from c++17/c++20. So I have to use the GNU g++.

 

I added the device-pack specs and crt lib. But I am still missing the lic / libm. Tries to compile myself, but automake reported strange errors.

 

 

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

You can get the .o / .a files you need from here:

 

http://packs.download.atmel.com/

 

Specifically the "ATmega" one. Download it and rename it from .atpack to .zip then explore the contents.

 

The CRT and the EEPROM support are here:

 

For the libm and libc just take the generic xmega3 versions:

 

 

Those are going to be the same in any generic copy of AVR-LibC from the last few years.

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

Ok, thank you,

 

I just managed to build the libc / libm from trunk of avr-libc!

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

wilopaan wrote:
Well, I normally use g++-8.2 because I use modern C++ with all features from c++17/c++20.

 

If you don't mind me asking, what features are you using? Normally, C++14, which is supported by the current Atmel tools, is more than enough for my AVR needs.