Reference CodeWarrior 7.0 for ColdFire.  There are tons o...

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

Reference CodeWarrior 7.0 for ColdFire.  There are tons o...

1,666 Views
kecart
Contributor III
Reference CodeWarrior 7.0 for ColdFire.  There are tons of preprocessor macros that are defined by the compiler, eg __COLDFIRE__, __MCF52235__, __MCF5223x__.  Are they documented anywhere?  I would like to use some of them in my code to allow a single source to work over a range of targets.  A simple example of where I would use these is in determining the right code snippet to select the pins to be used for TXD1, RXD1 and RTS1 where the same source is used on an MCF52236 and an MCF5208.  Which preprocessor macros are defined based on the ColdFire Processor settings tab and which ones come from the ColdFire Assembler settings tab?
Labels (1)
0 Kudos
Reply
3 Replies

364 Views
CrasyCat
Specialist III
Hello
 
There are two things here.
  1- The list of compiler predefined macro can be found in
       {Install}\Help\ColdFire_Build_Tools_Reference.chm
      Look into sections "Predefined Macros"  and "Coldfire Predefined Symbols" in there.
  2- There might be some macro defined in the project itself when you create your project
      using the wizard.
     Check the "C/C++ Preprocessor" panel in your target settings for more information.
 
I hope this helps.
 
CrasyCat
0 Kudos
Reply

364 Views
kecart
Contributor III
I've checked those references already.  You will not find __MCF5223x__ in any of the help files.  By trial and error I've found that __MCF5223x__ gets defined as a 1 while __MCF52235__ gets defined as 0x00002235.
0 Kudos
Reply

364 Views
CrasyCat
Specialist III
Hello
 
There may be something missing in the documentation.
 
I would recommend you to submit a service request for that.

Click here to submit a service request.

CrasyCat
0 Kudos
Reply