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?
The -mmcu= options are queried directly from the compiler, for example
with avr-gcc 4.7:
$ avr-gcc -print-multi-lib
.;
avr25;@mmcu=avr25
avr3;@mmcu=avr3
avr31;@mmcu=avr31
avr35;@mmcu=avr35
avr4;@mmcu=avr4
avr5;@mmcu=avr5
avr51;@mmcu=avr51
avr6;@mmcu=avr6
avrxmega2;@mmcu=avrxmega2
avrxmega4;@mmcu=avrxmega4
avrxmega5;@mmcu=avrxmega5
avrxmega6;@mmcu=avrxmega6
avrxmega7;@mmcu=avrxmega7
tiny-stack;@msp8
avr25/tiny-stack;@mmcu=avr25@msp8
The options are given by the parts after the ;
Thanks for advice
Johann
_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list