differentiating between HCS08/ColdFire

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

differentiating between HCS08/ColdFire

1,122 Views
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
Labels (1)
0 Kudos
1 Reply

234 Views
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 Kudos