Hi group!
Looking for help from someone with experience with IAR´s C-compiler for AVR (ATmega16/32)
I want to declare an array with pointers to constant text. And both of the should be in flash-memory, like this.
__flash char * __flash textTab[] = { "Text1", "Text2", "Text3", "Text4", "Text5", "Text6", "Text7", "Text8", "Text9", };
The array is easy to make in flash but the strings i cant manage. I managed to accomplish it by doing like this:
__flash char textText1[] = "Text1"; __flash char textText2[] = "Text2"; __flash char textText3[] = "Text3"; __flash char textText4[] = "Text4"; __flash char textText5[] = "Text5"; __flash char textText6[] = "Text6"; __flash char textText7[] = "Text7"; __flash char textText8[] = "Text8"; __flash char textText9[] = "Text9";
__flash unsigned char __flash *textTable[] = { textText1, textText2, textText3, textText4, textText5, textText6, textText7, textText8, textText9, };
But this is not sufficient bacause we need a LOT more texts.
Anyone got any idea?
//Erik