Hello,
I am using MSP430F5418 with IAR EW 5.10.
My problem is that when I execute the following code I got junk output in the variables.
#include <msp430.h>
#define STRING(variable,value) static const char (variable[]) @ "myseg" = (value)
#pragma location="myseg"
static const char test_str[] = "0123456";
__data20 static const char *_string_table [] = {
test_str,
};
__data20 char a, b, c, d;
int main ()
{
a = _string_table[0][0];
b = _string_table[0][1];
c = _string_table[0][2];
d = _string_table[0][3];
__no_operation();
}
My expected values in a,b,c,d are '0','1','2','3' respectively.
The segment "myseg" is located at 0x25000. But IAR is displaying junk values.
But when I compiled it using the "Large data model" it is giving the correct values.
But I can't use it. But I can use "Medium data model".
I think the problem is because the address is above FFFF.
So How can I refer a location which is at the upper memory?
Thanks.