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

Allocating Data Structure to Specific Memory Location

I have data structures of >166 Kbytes of data elements. I have declared these structures as:

typedef struct CodeTiming_tag
{
ubyte code_id;
ubyte algo_id;
uword timing_parameter[MAX_TABLE_ENTRY];
}CodeTimingType;

extern CodeTimingType xhuge current_code;
extern CodeTimingType xhuge next_code;
Compiling the source file that defines the "current_code" and "next_code" structures, I get the following error:
Error C172: 'FDATA0': length exceeded: act=32770, max=16384.

MAX_TABLE_ENTRY values greater than 1024 resulted in compiler error. I also did get an 'HDATA0' error, but it went away when I specifying to the LARGE memory model.

I am not declaring any FAR data in my code. Comments?

I am using a PHYTEC C167 development board 2MRAM and 2MROM, with the following default memory layout (specified in Start167.a66):

ROM (1st Meg) 0x0-0xFFFFF
RAM (1st Meg) 0x100000-0x1FFFFF
ROM (2nd Meg) 0x200000-0x2FFFFF
RAM (2nd Meg) 0x300000-0x3FFFFF

I would like to allocate the structure starting at the RAM 2nd Meg location. Suggestions?

Thanks for your help,
Phong