AVR-Toolchain for Gentoo Linux using crossdev

Since quite a long time, Gentoo Linux has problems building a GCC Toolchain for the AVR microcontroller architecture. This is just a short summary, how to get your toolchain running under Gentoo:

1. Emerge Toolchain

USE="-openmp -sanitize -vtv" crossdev -t avr -s4 -S --without-headers

2. Somehow, ldscripts go to /usr/x86_64-pc-linux-gnu/avr/lib/ldscripts but are actually expected to be located at /usr/avr/lib/ldscripts. A symlink quick fixes this issue

ln -s /usr/x86_64-pc-linux-gnu/avr/lib/ldscripts /usr/avr/lib/ldscripts

3. Have fun with your working toolchain

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.