[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [avr-libc-dev] Re: SPMEN, SELFPRGEN: name clash
From: |
Weddington, Eric |
Subject: |
RE: [avr-libc-dev] Re: SPMEN, SELFPRGEN: name clash |
Date: |
Mon, 31 Dec 2007 11:00:42 -0700 |
> -----Original Message-----
> From:
> address@hidden
> [mailto:address@hidden
> org] On Behalf Of Ivan Shmakov
> Sent: Sunday, December 30, 2007 9:45 PM
> To: address@hidden
> Cc: Ivan Shmakov
> Subject: [avr-libc-dev] Re: SPMEN, SELFPRGEN: name clash
>
> >>>>> "WE" == Weddington, Eric <address@hidden> writes:
>
> >> There's apparently a name clash between the SPMEN / SELFPRGEN fuse
> >> bit and the eponymous bit of the SPMCSR register.
> Consider, e. g.:
>
> >> $ nl -ba include/avr/iotn13.h
> >> ...
> >> 33 /* avr/iotn13.h - definitions for ATtiny13 */
>
> > This is already recorded as bug #21869:
> > <https://savannah.nongnu.org/bugs/?21869>
>
> Thanks for the pointer. (I haven't yet familiarized myself with
> the bug tracker.)
>
> > I'll be going through the IO headers to make sure other duplicates
> > are fixed before the next avr-libc release and before the
> next WinAVR
> > release in February.
>
> I'm primarily interested in what will be the solution to the
> problem? Would one of these be renamed, and which one, or both?
> Once it will be decided, an appropriate patch will be a matter
> of fifteen minutes.
The bit names for the registers have been around a long time. Those
would NOT be renamed. The fuse feature is new, so any renaming would be
done one those names.
For example, I would propose renaming the SELFPRGEN fuse definition to
SELFPRGEN_FUSE. And other duplicates renamed in a similar manner: add
the _FUSE suffix.
> As to searching for duplicates, the following script seems to
> find them (all?):
>
> include $ (for f in avr/io?*.h ; do \
> cpp -I. -D__ASSEMBLER__ \
> <(echo "#define _AVR_IO_H_" ; \
> echo "#include \"${f}\"") > /dev/null ; \
> done) 2>&1
> In file included from /dev/fd/63:2:
> ./avr/io90pwm316.h:912:1: warning: "PSYNC1" redefined
> ./avr/io90pwm316.h:911:1: warning: this is the location of
> the previous definition
> In file included from /dev/fd/63:2:
> ./avr/io90pwm3b.h:982:1: warning: "PSYNC1" redefined
> ./avr/io90pwm3b.h:981:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iom1284p.h:950:1: warning: "UBRR0" redefined
> ./avr/iom1284p.h:947:1: warning: this is the location of the
> previous definition
> ./avr/iom1284p.h:1005:1: warning: "UBRR1" redefined
> ./avr/iom1284p.h:951:1: warning: this is the location of the
> previous definition
> ./avr/iom1284p.h:1009:1: warning: "UBRR1" redefined
> ./avr/iom1284p.h:1005:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iom168.h:72:1: warning: "SELFPRGEN" redefined
> In file included from ./avr/iom168.h:36,
> from /dev/fd/63:2:
> ./avr/iomx8.h:315:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iom168p.h:746:1: warning: "UBRR0" redefined
> ./avr/iom168p.h:743:1: warning: this is the location of the
> previous definition
> ./avr/iom168p.h:840:1: warning: "SELFPRGEN" redefined
> ./avr/iom168p.h:333:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iom328p.h:747:1: warning: "UBRR0" redefined
> ./avr/iom328p.h:744:1: warning: this is the location of the
> previous definition
> ./avr/iom328p.h:841:1: warning: "SELFPRGEN" redefined
> ./avr/iom328p.h:334:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iom48p.h:744:1: warning: "UBRR0" redefined
> ./avr/iom48p.h:741:1: warning: this is the location of the
> previous definition
> ./avr/iom48p.h:838:1: warning: "SELFPRGEN" redefined
> ./avr/iom48p.h:331:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iom88.h:72:1: warning: "SELFPRGEN" redefined
> In file included from ./avr/iom88.h:36,
> from /dev/fd/63:2:
> ./avr/iomx8.h:315:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iom88p.h:746:1: warning: "UBRR0" redefined
> ./avr/iom88p.h:743:1: warning: this is the location of the
> previous definition
> ./avr/iom88p.h:840:1: warning: "SELFPRGEN" redefined
> ./avr/iom88p.h:333:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iotn13.h:349:1: warning: "SPMEN" redefined
> ./avr/iotn13.h:245:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iotn2313.h:619:1: warning: "SELFPRGEN" redefined
> ./avr/iotn2313.h:457:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iotn48.h:755:1: warning: "SELFPRGEN" redefined
> ./avr/iotn48.h:357:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iotn88.h:743:1: warning: "SELFPRGEN" redefined
> ./avr/iotn88.h:348:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iousb162.h:53:1: warning: "CKSEL0" redefined
> In file included from ./avr/iousb162.h:38,
> from /dev/fd/63:2:
> ./avr/iousbxx2.h:509:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iousb162.h:54:1: warning: "CKSEL1" redefined
> In file included from ./avr/iousb162.h:38,
> from /dev/fd/63:2:
> ./avr/iousbxx2.h:518:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iousb82.h:53:1: warning: "CKSEL0" redefined
> In file included from ./avr/iousb82.h:38,
> from /dev/fd/63:2:
> ./avr/iousbxx2.h:509:1: warning: this is the location of the
> previous definition
> In file included from /dev/fd/63:2:
> ./avr/iousb82.h:54:1: warning: "CKSEL1" redefined
> In file included from ./avr/iousb82.h:38,
> from /dev/fd/63:2:
> ./avr/iousbxx2.h:518:1: warning: this is the location of the
> previous definition
> include $
>
> I'm not sure there're no false positives in the above output.
> Hope it helps, anyway.
This helps a whole lot! :-) Thank you very much!
Eric