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
  • When you create a structure:

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

    You cannot specify different memory areas for the members of the struct. This is the problem. The far memory space for the data_pkt doesn't make sense.

    Jon

Reply
  • When you create a structure:

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

    You cannot specify different memory areas for the members of the struct. This is the problem. The far memory space for the data_pkt doesn't make sense.

    Jon

Children