differentiating between HCS08/ColdFire

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

differentiating between HCS08/ColdFire

1,514 次查看
KRichard
Contributor II
Hello, I've tried googling this easy-looking question but I came up empty.

I have code that compiles under both HCS08 and ColdFire and I'm wondering, whether there is a builtin compiler directive to differentiate between this two uCs.

Like

#ifdef __HCS08__
....
#endif

or

#ifdef __COLDFIRE__
....
#endif

I don't want to define these (actually that's what I do right now and I hope there is a more civilised solution).

Thanks,
Richard
标签 (1)
0 项奖励
回复
1 回复

626 次查看
CrasyCat
Specialist III
Hello
 
Each compiler vendor is using his own notation for the predefined macro indicating for which CPU it is currently generating code.
 
Please refer to your compiler manual for information on the macro used by your compiler vendor.
 
CrasyCat
0 项奖励
回复