KDS - Preprocessor tool settings define symbols issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

KDS - Preprocessor tool settings define symbols issue

跳至解决方案
5,671 次查看
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

标签 (1)
1 解答
5,173 次查看
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

在原帖中查看解决方案

4 回复数
5,173 次查看
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 项奖励
回复
5,172 次查看
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 项奖励
回复
5,174 次查看
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

5,172 次查看
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 项奖励
回复