How to add support for AVR64DA28 in AVR-GCC?(SOLVED)

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

I attempted to do so based on how I added support for the ATmega328PB (using this guide https://gist.github.com/goncalor...) but I've ran into an issue. I tried to compile a test program and this is the error that I got:

avr-gcc -g -Os -mmcu=avr64da28 -c main.c
avr-gcc: error: device-specs/specs-avr64da28: No such file or directory
make: *** [makefile:12: main.o] Error 1

I put the device-specs/specs-avr64da28 in the avr/lib directory but still the above error.

 

Here is my io.h entry:

#elif defined (__AVR_AVR64DA28__)
#  include <avr/ioavr64da28.h>

I placed the crtavr64da28.o and libavr64da28.a files in the avr/lib/avrxmega2 directory.

I placed the ioavr64da28.h file in the avr/include/avr directory.

 

gcc version is 5.4.0

OS is Linux Mint 20.

This topic has a solution.
Last Edited: Tue. Oct 13, 2020 - 08:06 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

mcu_nerd wrote:
gcc version is 5.4.0
Willing to try a more recent FSF AVR GCC?

Reason : IIRC, the following is a recent addition to that wiki

avr-gcc v8.4+, v9.3 and newer | avr-gcc - GCC Wiki

 

"Dare to be naïve." - Buckminster Fuller

This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the replay. I found the problem: my stupidity. When I was going back and fourth I wasn't too careful and grabbed the specs-avr64db28 instead.

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

The version of the gcc toolchain installed with the current Arduino IDE supports AVR-DA. I'm using it quite happily with an AVR128DA28 (-mmcu=avr128da28).

macbookpro-2:~ xxx$ /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc -v
...
gcc version 7.3.0 (GCC)

That may be the easiest way to get it.

 

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

You should be able to point gcc to the gcc folder in the DFP by using the -B switch... 

 

i.e

avr-gcc -mmcu=avr64da28 -B ../AVR-Dx_DFP/1.5.74/gcc/dev/avr64da28 -I ../AVR-Dx_DFP/1.5.74/include main.c
		

 

:: Morten

 

(yes, I work for Microchip, yes, I do this in my spare time, now stop sending PMs)

 

The postings on this site are my own and do not represent Microchip’s positions, strategies, or opinions.