CodeWarrior v10 Env. Variables

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

CodeWarrior v10 Env. Variables

761 Views
Chojun
Contributor I

Hello,

 

I have a project I'm working on that needs to be cross-platform.  To that end, we have a master configuration file (a .h file) that contains different #ifdefs, for example, #ifdef (WIN32), #ifdef (_LINUX), etc.  I need one for CodeWarrior (better, for the specific chipset/model I'm using).

 

I've tried using __CWCC__ as mentioned in the help files but that doesn't seem to be defined anywhere.  I'm not extremely familiar with eclipse either, so I'm not quite able to figure out what environment variables are automatically defined.

 

Is there a good #define that I could reference to detect if I'm working in CodeWarrior?  Even better, would there be a #define for my specific chip (Coldfire v2 M52233)?

 

 

Thanks in advance!

Labels (1)
0 Kudos
1 Reply

222 Views
CrasyCat
Specialist III

Hello

 

When you create your project are you creating a Bareboard project or a Linux/uclinux Application project?

 

I did try with V10.0 and created a bareboard project for MCF52233 and I am able to get appropriate definition for cnt1 when I write the following

 

#ifdef __CWCC__  int count1 = 0;#else  long count1 = 6;#endif

 

CrasyCat

0 Kudos