AnsweredAssumed Answered

Compiler macro for PPC core identification

Question asked by lowpy on Jan 27, 2016
Latest reply on Feb 2, 2016 by lowpy

I am using CodeWarrior for MCU V10.5. with the MPC5606B starterTrak and the PowerPC compiler.

I ran into a problem while trying to add platform based settings to a header file depending on the coretype specified by compiler macros. The PowerPC compiler documentation and CW help states that the compiler will define a macro depending on the employed platform. There is also a nice table in the CW help showing macros for all PPC cores.

 

For MPC5606B the selected CPU type in the project properties is zen so I would expect that the corresponding macro (__PPCZen__) is defined but it does not seem to be. I changed the cpu to generic expecting to have __PPCGENERIC__  defined but it was not. I also tried to test for __PPC56x__ and several other macros but without success.

 

Why aren't these macros defined? Does the compiler need an additional option to be set in order to generate these macros? Any help in getting this to work would be appreciated.

 

Thank you in advance!

Outcomes