Hi,
unsigned char is 1 byte in CodeWarrior for HCS12. so, this struct will take 3 bytes after compiled.
maybe the better way to do that is to define the element y as unsigned int.
If you just want the generated struct is aligned with 2bytes, then, you can also add "ALIGN 2" in the prm file follows the memory address like below:
| | EEPROM_00 | = READ_ONLY DATA_FAR IBCC_FAR 0x000800 TO 0x000BFF ALIGN 2; |
then, all data in EEPROM_00 will be aligned with 2 bytes.
I hope it helps!