Hello again,
The latest Microchip Packs at
http://packs.download.atmel.com/ have the relevant files for
now: perhaps they updated them in stages?
I have taken some time to read more of the docs (
https://gcc.gnu.org/wiki/avr-gcc#Using_avr-gcc ) and it seems that there is
a cleaner way of using the pack files than copying them piecewise into the
/usr/... directories.
For GCC support for the new 0-series and 1-series parts I do this in my
source code directory:
-----
$ mkdir gcc
$ mkdir gcc/device-specs
$ mkdir gcc/avrxmega3
$ mkdir gcc/avrxmega3/short-calls
$ cp ../microchip-packs/tmp/gcc/dev/attiny?*{0,1}[2467]/avrxmega3/*.{o,a}
gcc/avrxmega3/
$ cp
../microchip-packs/tmp/gcc/dev/attiny?*{0,1}[2467]/avrxmega3/short-calls/*.{o,a}
gcc/avrxmega3/short-calls/
$ cp ../microchip-packs/tmp/gcc/dev/attiny?*{0,1}[2467]/device-specs/*
gcc/device-specs/
-----
Then I add "-B gcc/" to the gcc command line (in CFLAGS in my Makefile) so
that it can find the new spec files.
...and for avr-libc support I do this:
-----
$ mkdir -p gcc/include/avr/
$ cp ../microchip-packs/tmp/include/avr/iotn?*{0,1}[2467].h
gcc/include/avr/
-----
Note /usr/lib/avr/include/avr/io.h does not need to be modified as the
system one has a clause that can construct the include file name if there
is no dedicated mapping.
However, this depends on support from the spec file. For example, the stock
spec file for atmega328pb is different from the one in the latest Microchip
pack file and does not specify __AVR_DEV_LIB_NAME__. Unpacking the new spec
file as described above then allows the stock avr/io.h to automatically
include the correct part-specific file. (However, even tho' the compiler
has a spec file for the atmega328pb, avr-libc support is missing, so you
still have to get that and the crt and lib files from the Microchip pack
anyway.)
This seems like a clean way for users to provide the Microchip pack files
to the compiler without messing around with the package manager maintained
directories so I'm posting here in case anyone else runs into this problem
and finds it useful.
Best wishes,
@ndy
--
andy...@ashurst.eu.org
http://www.ashurst.eu.org/
0x7EBA75FF