KDS - Preprocessor tool settings define symbols issue

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

KDS - Preprocessor tool settings define symbols issue

Jump to solution
1,247 Views
johnbaker
Contributor IV

I have a KDS project with 5 different build configurations.  Each build configuration defines unique symbols based on final project type that are referenced throughout the code to include or exclude source code.  When I set any build configuration as active and build the project KDS recognizes the appropriate symbols and works like a champ.

 

The problem is that when I am making changes to the code ALL of the source code is grayed out because the none of the symbols are set in code.  When I now right-click on a variable or function and try to "Open Declaration" it no longer works.

 

Has anybody else run into this situation or know how to correct it?

 

I could define the appropriate symbols for each build configuration in the code as I was doing before but the reason I changed it in the first place was so that I would not screw up and forget to change the #define's to the correct settings before building.

 

I tried defining ALL of the symbol in the source but that made things even worse when I went to do a build.  (MANY Errors due to all code being included!)

 

Thanks,

 

John Baker

Labels (1)
1 Solution
749 Views
BlackNight
NXP Employee
NXP Employee

Hello,

if you have that 'grayed out' code problem, I think you see an old Eclipse Indexer problem: see Fixing the Eclipse Index | MCU on Eclipse  for the explanation and solution for it.

I hope this helps,

Erich

View solution in original post

4 Replies
749 Views
DavidS
NXP Employee
NXP Employee

Hi John,

Once you have built/compiled the target, right click on the project folder the surf to Index->Rebuild to have the index registry rebuilt.  I think that will work for you.

Yell if it doesn't.

Regards,

David

0 Kudos
749 Views
johnbaker
Contributor IV

Dave,

I tried this first.  No change.  I had to make a couple of changes in my indexer preferences (see reply to Erich and attached snapshot) and it works fine now.

Thanks,

John

0 Kudos
750 Views
BlackNight
NXP Employee
NXP Employee

Hello,

if you have that 'grayed out' code problem, I think you see an old Eclipse Indexer problem: see Fixing the Eclipse Index | MCU on Eclipse  for the explanation and solution for it.

I hope this helps,

Erich

749 Views
johnbaker
Contributor IV

Thanks Erich, that fixed it!

I had to un-select “Allow heuristic resolution of includes” and select “Use active build configuration” in preferences and it if working fine now.

John

0 Kudos