[SOLVED] how to read flash memory data via pointer in winavr

Status
Not open for further replies.
Most compilers have specific storage class qualifiers for variables mapped to flash, and also require a respective pointer definition. Usually the keyword const or rom qualifies programm memory variables. Technically this required by the processor architecture with separate busses and instructions for data and programm memory.
 

According to GCC manual, this should work
Code:
const __flash char str[] ={"arun sharma"};
const __flash char *p;
p=&str[0];
// or 
p=str;
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…