Собрал crossdev'ом avr, успешно;
В итоге собралось cross-avr/gcc-4.4.2, cross-avr/binutils-2.20, cross-avr/avr-libc-1.6.4;
Проблема заключается в следующем, при компиляции avr-gcc сыпит error'ы на 'undeclared (first use in this function)':
avr-gcc -mmcu=atmega16 -o test.o LCD.c
LCD.c: In function `LCD_putchar':
LCD.c:31: error: `DDRD' undeclared (first use in this function)
LCD.c:31: error: (Each undeclared identifier is reported only once
LCD.c:31: error: for each function it appears in.)
LCD.c:33: error: `PORTD' undeclared (first use in this function)
LCD.c:35: error: `PORTC' undeclared (first use in this function)
LCD.c: In function `LCD_getaddr':
LCD.c:56: error: `DDRD' undeclared (first use in this function)
LCD.c:58: error: `PORTC' undeclared (first use in this function)
LCD.c:62: error: `PIND' undeclared (first use in this function)
LCD.c: In function `LCD_wait':
LCD.c:74: error: syntax error before '}' token
LCD.c: In function `LCD_command':
LCD.c:80: error: `DDRD' undeclared (first use in this function)
LCD.c:81: error: `PORTD' undeclared (first use in this function)
LCD.c:82: error: `PORTC' undeclared (first use in this function)
LCD.c: In function `LCD_init':
LCD.c:99: error: `DDRC' undeclared (first use in this function)
LCD.c:100: error: `PORTC' undeclared (first use in this function)
LCD.c:102: warning: implicit declaration of function `_delay_loop_2
Сам avr-gcc:
avr-gcc -v
Using built-in specs.
Target: avr
Configured with: /var/tmp/cross/avr/portage/cross-avr/gcc-4.4.2/work/gcc-4.4.2/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/avr/gcc-bin/4.4.2 --includedir=/usr/lib/gcc/avr/4.4.2/include --datadir=/usr/share/gcc-data/avr/4.4.2 --mandir=/usr/share/gcc-data/avr/4.4.2/man --infodir=/usr/share/gcc-data/avr/4.4.2/info --with-gxx-include-dir=/usr/lib/gcc/avr/4.4.2/include/g++-v4 --host=x86_64-pc-linux-gnu --target=avr --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-nls --without-included-gettext --with-system-zlib --disable-checking --disable-werror --enable-secureplt --disable-libmudflap --disable-libssp --disable-libgomp --enable-cld --with-python-dir=/share/gcc-data/avr/4.4.2/python --disable-libgcj --enable-languages=c,c++ --enable-shared --disable-threads --disable-bootstrap --disable-libgomp --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.2 p1.0'
Thread model: single
gcc version 4.4.2 (Gentoo 4.4.2 p1.0)