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

Overcoming error 172???

Hi

When i type this,

struct cmd_pkt{
int type;
int OGF;
int OCF;
int len;
unsigned int far data_pkt[256];
};

struct cmd_pkt c_pkt;

After I complied it, it prompt me with this error.
Error 172: '?DT?BT_COMMAND': segment too bigt (act = 526, max = 128)

The maximum value that I can put before getting this error is 40.

What causes this error? Can this error be overcome?


When I tried this(meaning without the structure),

unsigned int far data_pkt[256]

it did not give me any error. Why?

I'm using the MCBx51 V2.1 Prototype Board with the 80251 chip..

Thanks in advance.

Parents
  • segment too bigt (act = 526, max = 128)

    Sounds clear enough to me: you've asked for 526 bytes ("act=526"), but the maximum available is only 128 ("max = 128")

    I dunno about the 80251, but on the 8051 the DATA space cannot be more than 256 because that's the way the hardware of the chip is built.
    You need to put your big structure in another memory area; eg, XDATA

    I think you need to read-up on the 80251 memory architecture, and Keil's memory models.

Reply
  • segment too bigt (act = 526, max = 128)

    Sounds clear enough to me: you've asked for 526 bytes ("act=526"), but the maximum available is only 128 ("max = 128")

    I dunno about the 80251, but on the 8051 the DATA space cannot be more than 256 because that's the way the hardware of the chip is built.
    You need to put your big structure in another memory area; eg, XDATA

    I think you need to read-up on the 80251 memory architecture, and Keil's memory models.

Children
No data