This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Using Constant in code bank array

Hi,
I am trying to locate a constant array in a code segment as follows.

In BL51 MISC option

"BANK0 (?CO?A)" is given.

In 'a.c'
char code a[5] = {1,2,3,4,5};

in 'main.c'
extern char code a[5];

When I try to see the values in the array 'a' in main.c I could able to see the values correctly in Watch Window. But when I try to assign that value to a variable its not getting assigned.

eg:
char b = 0;

b = a[1];

after this statement 'b' still remains as 0.
But if I put a[1] in watch window its showing me the correct value.

Why its happening? Can anybody help me out.

0