how to set a constant array at address in CCS compiler

Status
Not open for further replies.

muruga86

Member level 3
Joined
Mar 26, 2005
Messages
54
Helped
2
Reputation
4
Reaction score
1
Trophy points
1,288
Location
Chennai, India
Activity points
1,927
ccsc const array

can any one help me to set a constant array at a particular ROM address say 0x1000 in CCS compiler.
 

const char ccs compiler

i think i can be done just like below

#ORG 0x1000, 0x100F
char const array[20]={"1234567890"};

the important thing is;
you can access the table by x=array[1]; or x=array;
but you cannot use this code; ptr=&array;
in this case, a pointer to the array cannot be constructed.
 

    muruga86

    Points: 2
    Helpful Answer Positive Rating
ccs compiler pointer to constant

thanks for ur advice and had implemented.
i want to get the starting address of the constant array how to do that? with our using pointer to constant which is not allowed in ccs
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…