Re: How to use pgmspace.h in a library source without warning?

"Weddington, Eric" <[email protected]>
Newsgroups gmane.comp.hardware.avr.gcc
Message-ID <F4ADC872C7AFBE49A9CEDE5C75191C2749FC4FD8@dvrmbx01>

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On
> Behalf Of Georg-Johann Lay
> Sent: Friday, June 07, 2013 11:44 AM
> To: Thomas D. Dean
> Cc: [email protected]
> Subject: Re: [avr-gcc-list] How to use pgmspace.h in a library source
> without warning?
> 
> >
> > Look at avr/io.h, where the warning is issued.  avr5 is not one of
> the
> > defined device types.
> >
> > You have to use a specific device.
> >
> > Tom Dean
> 
> That's not a good approach.  Reading avr/io.h, the solution reads
> 
> #define __COMPILING_AVR_LIBC__
> 
> 
> Libraries are typically defined for groups of devices, not for each of
> the ~ 200 AVR devices...
> 

Although, I've wanted to change that for a number of years. There are advantages to building lib/device. It makes it easier to customize the library.

But, of course, that requires quite a bit of effort, mainly in the autotools area, and that's what has stopped me from doing it. That and we keep having perennial discussion on increase of the build-time if we went to lib/device. I argue that it is still worth it, computers get faster every year, and with avr-libc we can do a lot of building in parallel (make -j).

But that's an orthogonal discussion to this thread...

Eric
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.