I was wondering if the gurus could assist me with placing an array of struct into FLASH. Incorporating the tips from GCC and the PROGMEM Attribute and PROGMEM using structs and arrays I am still having a little trouble placing
str1
into FLASH. Compiling this example in avr-gcc produces a warning
main.c:15: warning: '__progmem__' attribute ignored
//main.cc #include#include typedef struct { const uint8_t len; const char const *string; } string_t; void main() { string_t str1 PROGMEM = {3, "abc"}; }
The goal is to store the 3 and "abc" in FLASH. Is there a way I can properly instruct avr-gcc to place str1 into FLASH? I assume this is not being done given the warning gcc is giving?
Edit: fixed spelling