mhamini
Member level 1
- Joined
- Aug 23, 2005
- Messages
- 40
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- Iran-Tehran
- Activity points
- 1,690
ccs rom pointer
I use MB90F591 and MDE,
I define a pointer like this:
__far const unsigned char *TBL_WIN_ADDR_CHN[] =
{
TBL_WIN_0, TBL_WIN_1_CHN,
}
__far const unsigned char TBL_WIN_0[] =
{
0,1,
1,1,142,238,
1,207,80, 30,16, 0,
0xFF,0xFF,0xFF,0xFF
};
__far const unsigned char TBL_WIN_1_CHN[] =
{
0,2,
1,1,142,238,
31,5,50,90,229,0,8,1,249,0,202,0,201,0,
11,60,70,90,
11,60,85,90,
12,15,70,90,
12,15,70,150,
0xFF,0xFF,0xFF,0xFF
};
Because of I have too many things like TBL_WIN_0[], I'd like to place these in ROM area. In fact the linker place these init in Rom but init these in INIT section. So I am short of RAM.
The problem is how to use the pointer like CONST and don't init it in INIT?
I use MB90F591 and MDE,
I define a pointer like this:
__far const unsigned char *TBL_WIN_ADDR_CHN[] =
{
TBL_WIN_0, TBL_WIN_1_CHN,
}
__far const unsigned char TBL_WIN_0[] =
{
0,1,
1,1,142,238,
1,207,80, 30,16, 0,
0xFF,0xFF,0xFF,0xFF
};
__far const unsigned char TBL_WIN_1_CHN[] =
{
0,2,
1,1,142,238,
31,5,50,90,229,0,8,1,249,0,202,0,201,0,
11,60,70,90,
11,60,85,90,
12,15,70,90,
12,15,70,150,
0xFF,0xFF,0xFF,0xFF
};
Because of I have too many things like TBL_WIN_0[], I'd like to place these in ROM area. In fact the linker place these init in Rom but init these in INIT section. So I am short of RAM.
The problem is how to use the pointer like CONST and don't init it in INIT?