Hi, thanx for the repport, but iom328pb.h is not provided by avr-libc as far as I can tell? So it would have to be added to the patch for it to be usefull. Can I also suggest that you report this upstream aswell:
http://savannah.nongnu.org/bugs/?group=avr-libc Thanx! On Wed, Jul 5, 2017 at 1:59 AM, Paul "LeoNerd" Evans <leon...@leonerd.org.uk > wrote: > Package: avr-libc > Version: 1:2.0.0+Atmel3.5.4-1 > Severity: normal > Tags: patch > > Attempting to build a program for the new ATmega328PB, it seems the > device-specific IO file is not found: > > avr-gcc -std=gnu99 -Wall -Os -DF_CPU=16000000 -mmcu=atmega328pb -flto > -ffunction-sections ... > In file included from src/test.c:1:0: > /usr/lib/avr/include/avr/io.h:623:6: warning: #warning "device type not > defined" [-Wcpp] > # warning "device type not defined" > ^ > > I do have the required iom328pb.h file though: > > -rw-r--r-- 1 root root 27K Jul 22 2016 /usr/lib/avr/include/avr/ > iom328pb.h > > Further, I see that iom328pb.h isn't listed in the big long section of > #ifdef-guarded #includes in the main io.h. I see there is an attempted > generic fallback section based on value of __AVR_DEV_LIB_NAME__ but it > seems for whatever reason that isn't kicking in today. > > If I simply add the required 2 lines (by copying the 328P example), my > code will compile fine. Attached is my patch. > > > -- System Information: > Debian Release: 9.0 > APT prefers testing > APT policy: (990, 'testing'), (500, 'unstable') > Architecture: amd64 (x86_64) > Foreign Architectures: i386 > > Kernel: Linux 4.9.0-3-amd64 (SMP w/4 CPU cores) > Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), > LANGUAGE=en_GB:en (charmap=UTF-8) > Shell: /bin/sh linked to /bin/dash > Init: systemd (via /run/systemd/system) > > Versions of packages avr-libc depends on: > ii binutils-avr 2.26.20160125+Atmel3.5.3-1 > ii gcc-avr 1:4.9.2+Atmel3.5.4-1 > > avr-libc recommends no packages. > > avr-libc suggests no packages. > > -- no debconf information > -- Håkan Ardö