Adding pre-processor defines to CW 10.1 Coldfire project

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

Adding pre-processor defines to CW 10.1 Coldfire project

691 Views
mjbcswitzerland
Specialist V

Hi All

 

I have used CW10.1 with Kinetis and am now trying to use it with Coldfire.

The problem that I have is that I need to add a pre-processor define to the project; this I can do with Kinetis by adding it under "ARM Compiler -> Input -> Defined Macros".

However when configured for Coldfire the "Coldfire compiler -> Input" contains only user paths and not defines.

 

How can this be done? [as reference, using CW 7.2 this was done in "Language settings -> C/C++ Preprocessor - Prefix text and then #define xxxx]

 

Regards

 

Mark

Labels (1)
0 Kudos
2 Replies

267 Views
BlackNight
NXP Employee
NXP Employee

Hello,

yes, I miss that panel too, and I made a request to have it added for ColdFire in the next MCU release.

For now you can add additional options in the

C/C++ Build > Settings > ColdFire Compiler > Language settings.

On the bottom of that pate there is 'Other flags' where you can add any additional flags. So to add your own defines add

-define MY_DEFINE=1

which would be equivalent to

#define MY_DEFINE 1

in the sources.

 

BK

0 Kudos

267 Views
mjbcswitzerland
Specialist V

Hi BK

 

Thanks - that has worked.

 

Regards

 

Mark

 

0 Kudos