Bug#867235: avr-libc: Fails to find iom328pb.h

2018-09-12 Thread Paul "LeoNerd" Evans
On Sat, 5 Aug 2017 11:17:52 +0200
Hakan Ardo  wrote:

> 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

Took me a while to get around to it, but now reported at

  https://savannah.nongnu.org/bugs/index.php?54652

-- 
Paul "LeoNerd" Evans

leon...@leonerd.org.uk  |  https://metacpan.org/author/PEVANS
http://www.leonerd.org.uk/  |  https://www.tindie.com/stores/leonerd/



Bug#867235: avr-libc: Fails to find iom328pb.h

2017-08-05 Thread Hakan Ardo
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  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=1600 -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ö


Bug#867235: avr-libc: Fails to find iom328pb.h

2017-07-04 Thread Paul "LeoNerd" Evans
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=1600 -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
--- /usr/lib/avr/include/avr/io.h.orig	2017-07-05 00:48:35.739212601 +0100
+++ /usr/lib/avr/include/avr/io.h	2017-07-05 00:47:21.191361651 +0100
@@ -270,6 +270,8 @@
 #  include   
 #elif defined (__AVR_ATmega328P__)
 #  include 
+#elif (defined __AVR_ATmega328PB__)
+#  include 
 #elif (defined __AVR_ATmega328__)
 #include 
 #elif defined (__AVR_ATmega329__)