differentiating between HCS08/ColdFire

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

differentiating between HCS08/ColdFire

1,511件の閲覧回数
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 返信

623件の閲覧回数
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 件の賞賛
返信