cancel
Showing results for 
Search instead for 
Did you mean: 

C file not recognizing #define

joemccarr
Senior
Posted on December 09, 2016 at 13:36

My IDE has a feature that uses less contrasting text for code that is 'inactive' (not included)

 from this I found that some code is not being included that i had expected to be.

 

For instance stm32f0xx_ll_tim.c   &sharpincludes stm32f0xx_ll_tim.h,  which in itself &sharpincludes stm32f0xx.h, which &sharpincludes stm32f030x8.h  which &sharpdefines TIM3. There is a line in stm32f0xx_ll_tim.c that reads ...

 &sharpif defined (TIM1) || defined (TIM2) || defined (TIM3)

  {

      then do this

  }

 

 but the 'then do this' code is not highlighted

 I would of thought stm32f0xx_ll.c would know of TIM3 existance because of the

 nested includes but it doesnt.

 

 Am I missing something?

#c-language
10 REPLIES 10
Posted on December 14, 2016 at 17:53

If you are comfortable with your Eclipse stuff - no problem. There are some/many people loving it.

I use Crossworks (no Eclipse) at home, EmBlocks/EmBitz(no Eclipse) for 'side show' projects under Window$, and IAR WB (no Eclipse) professionally. And sometimes, Altium/Tasking (Eclipse) for C164-based project (a 8051 derivate).

Well and I'm OLD.... That doesn't help.

My kids say me too.

Not that I already suffer from dementia, but an advanced age makes one think if it really has any benefit to indulge in an issue/occupation. And more often, the decision is 'no' ...