Hi Sfb,
You have to move the definition (the typedef) of the struct into the header file,
so that it can be included and used by both cores. Basically this is not different to share a global structure in between 2 C files for any C compiler.
Sharing data in between the XGATE and the S12X works fine with the following 2 things to lookout for.
First, pointers are different for the S12X and the XGATE, arrays are fine though. So sharing pointers in between the cores is more advanced. Note that pointers may also be different in size, so be careful with pointers in general, even if not used by both cores.
Second, the XGATE core needs to align all 16 bit (and larger) objects, the S12X does not. The best and most straight forward approach is to always even align all 16 bit fields in all structs, so the compilers do not need to align anything.
(If this is not done, then the S12X compiler needs to be told (I think with a pragma) to insert the same alignment bytes as the XGATE needs.
Daniel