[Icc-mot] tables in Flash not RAM
Dean Bell
dean.bell at flightec.com
Wed Dec 19 14:28:58 PST 2007
Try this.
const INTU8 MENU_1_MSG[] = {"\r\nFirst Menu Line\r\n"};
const INTU8 MENU_2_MSG[] = {"\r\nThe Second Menu Line\r\n"};
const INTU8 MENU_3_MSG[] = {"\r\nThe Third Menu Line\r\n"};
const INTU8 MENU_4_MSG[] = {""}; // end of table
typedef const char* STR;
const STR menuTable2[] =
{
MENU_1_MSG,
MENU_2_MSG,
MENU_3_MSG,
MENU_4_MSG // end of table
};
Dean.
_____
From: icc-mot-bounces at imagecraft.com [mailto:icc-mot-bounces at imagecraft.com]
On Behalf Of Wade A Smith
Sent: Thursday, 20 December 2007 08:46
To: icc-mot at imagecraft.com
Subject: [Icc-mot] tables in Flash not RAM
How do I get the table into Flash?
--------------------- code
#define MENU_MAX_MSGS 3
const INTU8 *menuTable[MENU_MAX_MSGS+1] =
{
{"\r\nFirst Menu Line\r\n"},
{"\r\nThe Second Menu Line\r\n"},
{"\r\nThe Third Menu Line\r\n"},
{""} // end of table
};
--------------------- generated code
.area data
3020 _menuTable::
0020 .blkw 1
.area idata
--- 0020 03B8 .word L22
.area data
0022 .blkw 1
.area idata
--- 0022 0375 .word L23
.area data
0024 .blkw 1
.area idata
--- 0024 032D .word L24
.area data
0026 .blkw 1
.area idata
--- 0026 03E7 .word L21
---------------------
menuTable is at $3020 which is a RAM address. Any problems and I lose the
addresses of the strings.
L22, L23, L24 and L21 are in Flash at 0x5###.
How do I get menuTable to be in Flash and NOT RAM?
'const' does nothing. If I leave out 'const', it does the same -- the
variable is in RAM and the strings are in Flash and I still cant see the
variables.
wade
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dragonsgate.net/pipermail/icc-mot/attachments/20071220/25029463/attachment.html
More information about the Icc-mot
mailing list