Different struct size in S12X and XGATE code

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Different struct size in S12X and XGATE code

3,095件の閲覧回数
pittbull
Contributor III
Hello,
I have a header file that contains a struct declaration. This file is #included in both, S12X and XGATE codes. When I build them, the linker shows a warning message, something like "object 'x' has different size in a.c and b.cxgate". I think it is because XGATE needs struct members at even boundaries whereas S12 can access them from any address. Is there a #pragma to force structs to even boundaries?
ラベル(1)
0 件の賞賛
返信
2 返答(返信)

835件の閲覧回数
Sten
Contributor IV

The following is an quote from the CW for S12 v. 4.5 help file:

#pragma align  (on|off)
Synonym

None.

Arguments

on: the HCS12X compiler uses the same alignment as the XGATE compiler
off: the HCS12X compiler uses no alignment

 

0 件の賞賛
返信

835件の閲覧回数
pittbull
Contributor III
Hello,
Thanks very much. That's what I need :smileyhappy:
0 件の賞賛
返信