pragma option for packed

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

pragma option for packed

663 次查看
preetuabraham
Contributor III

Hi,

 

I would like to know the settings for changing this pragma to a different below in Code warrior 10.x for Cold fire processor MC5485 processor ,since the below line is throwing an error that it is an illegal pragma

 

//#pragma options align=packed.  This was working in Metrowerks Codewarrior

 

Whether we can use #pragma options align= coldfire instead of the packed

标签 (1)
0 项奖励
回复
1 回复

489 次查看
preetuabraham
Contributor III

Hi,

As per the MCU_Codlfire_Compiler.pdf(page no:355), I think the equivalent pragma directive is

#pragma pack (0 | n | push | pop) , where n  is 1, 2, 4, 8, or 16.

So anyone from Codewarrior ,correct me if I am wrong .

Pelase clarify whether if n is 2 ,whether it is 2 byte alignment for structures and if n is 4 ,whether it is 4 byte alignment for structures

0 项奖励
回复