Have following structure:
Code: Select all
#pragma pack(push, 1)
typedef struct
{
UINT32 magicNumber;
UINT32 length;
UINT32 crc16;
UINT32 applicationMajorVersion;
UINT32 applicationMinorVersion;
} applicationHeader_t;
#pragma pack(pop)
Mapped to 0x40280000.
So assume I have:
const applicationHeader_t appHdr at 0x40280000.
I can read a member of the structure with os_memcpy(&testVAriable, &appHdr->magicNumber, sizeof(testVAriable))
but I can't read it directly as: (ends up with LoadStoreErrorException at 0x40280000):
const applicationHeader_t * ptr = &appHdr;
UINT32 test = ptr->magicNumber; <<<- it will crash here
Any suggestions?