homebrew-avr: New tiny (atxmega3 core) such as ATtiny817 seem to be missing
Since AVR-GCC 8, the new tiny are supported: https://gcc.gnu.org/gcc-8/changes.html
If I do a find /usr/local/Cellar/avr-gcc -iname "*attiny817*"
I do get the following:
/usr/local/Cellar/avr-gcc/9.2.0_1/lib/avr-gcc/9/gcc/avr/9.2.0/device-specs/specs-attiny817
That specs file refers to a crtattiny817.o
which seems to be missing.
If I instead search e.g. for the “ATxmega64a3u”, I get
/usr/local/Cellar/avr-gcc/9.2.0_1/avr/lib/avrxmega4/libatxmega64a3u.a
/usr/local/Cellar/avr-gcc/9.2.0_1/avr/lib/avrxmega4/crtatxmega64a3u.o
/usr/local/Cellar/avr-gcc/9.2.0_1/lib/avr-gcc/9/gcc/avr/9.2.0/device-specs/specs-atxmega64a3u
In fact, /usr/local/Cellar/avr-gcc/9.2.0_1/avr/lib/avrxmega3
seems to be completely missing.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 16 (6 by maintainers)
Hey @metropt, thank you for your answer! Could you nonetheless please post the exact full command-line that did work for you?
Note that the
-B
flag does not actually set device specs, but rather it prepends a number of directories to the compiler’s search paths in the various build passes - including when looking for specs.I was able to download the device pack from atmel from packs.download.atmel.com. With that, I was able to compile my source with a command-line as follows:
However, this does only compile (
-c
flag), so it will never show the link problems I posted above. If I tryinstead, the missing
crtattiny817.o
andlibattiny817
are indeed found, but I still getskipping incompatible ...
for-lm
and-lc
.Indeed, gcc tries to locate
libm.a
andlibc.a
in the usual way, and only finds those for other architectures (becauseavrxmega3
is currently missing from avr-libc). Of course, within atmel’s gcc 5.4 download, there are alsolibm.a
andlibc.a
foravrxmega3
. Maybe these are the ones your build found? In any case, the approach here is re-using binaries downloaded from unknown origin (atmel) - it might very well not work together with our version of gcc and lead to silently and fatally failing code.