I have several arrays (LCD bitmaps) stored in rom memory because there is not enough ram to hold them all.
Optimized my code as much as possible but still running out of rom memory a little bit unfortunately....
There's enough ram left to move a few of the arraytables back to ram which would solve my problem.
In a switch construction I'm assigning the appropriate table to a variable but here I have to deal with the problem that the types do not match anymore..
to illustrate my problem
CODE
rom unsigned char *lcd_CW16bData1 = {
0x0,0x88,
0x1,0x10,
0x2,0x20,
0x70,0x40,
0xF8,0x86,
0x0,0x0,
0x0,0x0
};
rom unsigned char *lcd_CW16bData2 = {
0x0,0x88,
0x1,0x10,
0x2,0x20,
0x70,0x40,
0xF8,0x86,
0x0,0x0,
0x0,0x0
};
rom unsigned char *lcd_CW16bData3 = {
0x0,0x88,
0x1,0x10,
0x2,0x20,
0x70,0x40,
0xF8,0x86,
0x0,0x0,
0x0,0x0
};
unsigned char lcd_CW16bData99[14] = {
0x0,0x88,
0x1,0x10,
0x2,0x20,
0x70,0x40,
0xF8,0x86,
0x0,0x0,
0x0,0x0
};
//etc.
rom unsigned char *table;
switch (condition ) {
case 0:
table= lcd_CW16bData1;
break;
case 4:
table= lcd_CW16bData2;
break;
case 5:
table= lcd_CW16bData3;
break;
default:
table=lcd_CW16bData99;
// etc.
};
display(table);
In this example I moved lcd_CW16bData99 from rom to Ram data.
This generates the next error(s)
warning: conversion from 'unsigned char[]' to 'rom unsigned char*'
internal error: failed to generate assignment expression
error: failed to generate expression
Is there a (simple) way to get around this..?