I have the following memory allocation:
unsigned char g1[]={
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ....0x00 ,0x00 ,0x00 ,0x00 ,0x00 };
g2[]={
0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ,0x00 ....0x00 ,0x00 ,0x00 ,0x00 ,0x00 };
...
unsigned char* index[10] = {g1,g2,g3,g4,g5,g6,g7,g8,g9,g0};
This is accessed in the following way:
unsigned char* getMatch(int input){
return index[input];
}
This is then futher acces using the method of
unsigned char store[1024]
unsigned char* temp = getMatch(n);
for(int i=0;i <50;i++){
store[i]=temp[i];
}
and store is then modified and send to an external device.
As my program is randomly failing I think it might be running low on SRAM and was wondering if there is any way to force this memory to be placed in flash. Anybody got an idea?