avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] How to use pgmspace.h in a library source without war


From: Thomas D. Dean
Subject: Re: [avr-gcc-list] How to use pgmspace.h in a library source without warning?
Date: Fri, 07 Jun 2013 10:20:20 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5

On 06/07/13 09:53, Georg-Johann Lay wrote:
Suppose the following include in a library source.c:

#include <avr/pgmspace.h>

and the source compiled with, e.g. -mmcu=avr5 or -mmcu=avr35 etc.

This throws a warning like:

$ avr-gcc -mmcu=avr5 source.c -c

In file included from INSTALL/avr/include/avr/pgmspace.h:88:0,
                  from source.c:1:
INSTALL/avr/include/avr/io.h:428:6: warning: #warning "device type not
defined" [-Wcpp]

Is there a way to build library modules that use pgmspace functionality
without such annoying 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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]