Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

place pointer into ROM

Status
Not open for further replies.

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?
 

May be your compiler does not support pointers to ROM like CCS one for example.
You'd better check this
 

Thry like this, I am not sure, in mcs51 it means variable TBL_WIN_ADDR_CHN is placed in ROM and also points to ROM location.

Code:
__far const unsigned char * const TBL_WIN_ADDR_CHN[]

Cheers
idlebrain
 

    mhamini

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top