This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Compiler/TMDX570LC43HDK: Strange (for me) byte assignment to struct

Part Number: TMDX570LC43HDK

Tool/software: TI C/C++ Compiler

Hy,

maybe a stupid problem but is first time I faced it,

it regards a struct, defined in this way

typedef struct fttethernet_frame
{
    uint16 vlan_tag;                   // 0x60, 0x0a,
    uint8  message_id;              // 0x02
    uint16 frame_length;            // 0x01, 0x00
}fttethernet_frame_t;

the values in the comments describe how I load it with a test array:

static const uint8 pkt1[60] = {
0x60, 0x0a,                                             // vlan_tag
0x02,                                                   // message_id
0x01, 0x00                                              // frame_length
};

the result of the following instruction is unpredicatable for me

    fttethernet_frame_t *frame_rx;
    frame_rx = (fttethernet_frame_t *)pkt1;

in fact I've the following:

can you tell why frame_length is 0x0000 instead of 0x0100 ?

Thanks

Antonio