cancel
Showing results for 
Search instead for 
Did you mean: 

STM32CubeIDE: Icon Decorators: exclude resource from build

KayJay
Associate II

Hi,

I'm seeing some odd behavior with the icon decorators on excluded source files:

  • Create a new STM32 project with everything as default
  • Build the project ... all good
  • Add a source file, say demo1.c that contains a single function
  • Add another source file, say, demo2.c, that contains a single function
  • Create two new build configurations, say, Demo1 and Demo2
  • Set Demo1 as the active configuration and exclude resource demo2.c
  • Set Demo2 as the active configuration and exclude demo1.c
  • Build the Demo1 configuration ... look in the console output to prove it built demo1.c and excluded demo2.c
  • Build the Demo2 configuration ... look in the console output to prove it built demo2.c and excluded demo1.c
  • ...but the icon decorators are not showing the excluded resources

This is with STM32CubeIDE v1.4.2

Any ideas?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
KayJay
Associate II

This problem was finally solved by changing a setting in the C/C++ indexer.

Window > Preferences > C/C++ General > Indexer:

0693W000007AshHQAS.jpgSelecting "Use active build configuration" makes the excluded resource icon decorators behave as expected.

View solution in original post

6 REPLIES 6
Cartu38 OpenDev
Lead II

Works for me if 1.5.0 release at least. Decorator is well set in sync. with exclusion & active build configuration.

Maybe some overlapping deorator(s) in your case (have you already some decoration on which may hide exclusion one ?) ?

KayJay
Associate II

Seems fixed in STM32CubeIDE v1.5.0. Thanks for investigating.

First guess was a CDT issue. At least facing same issue if 2020.03 Eclipse / CTD platform.

SM32CubeIDE 1.5.0 is relying now on 2020.06 platform.

Can I ask this question again please? I've been using STM32CubeIDE v1.5.0 for a few weeks now with no problems but suddenly the build configurations are no longer showing the correct decorator icons. I've attached a sample minimum project that shows this problem on two different Windows 10 PCs running STM32CubeIDE v1.5.0. The project has two build configurations called "Config1" and "Config2":

0693W000006FpnIQAS.jpgThe project explorer looks like this when configuration Config1 is selected. The box highlights a source folder that contains excluded resources:

0693W000006Fpq7QAC.jpg 

Here's the build output for Config1 showing the resources are correctly excluded:

0693W000006Fpw0QAC.jpgHere's the build output for Config2 showing the resources are correctly excluded:

0693W000006FpxwQAC.jpg 

...but the project explorer view hasn't changed. It's still showing the excluded resources for Config1 when I expect to see the excluded resources for Config2. I hope someone can repeat this from the attached project and let me know if I'm configuring the project wrong or if there's a problem with STM32CubeIDE. Thanks for any help.

According to me common Eclipse behavior here. You not see what you're compiling if Project Tree view but active build configuration setup.

Let's play with active configuration setup (many way but project contextual project menu is good one):

0693W000006Fs9aQAC.jpg

KayJay
Associate II

This problem was finally solved by changing a setting in the C/C++ indexer.

Window > Preferences > C/C++ General > Indexer:

0693W000007AshHQAS.jpgSelecting "Use active build configuration" makes the excluded resource icon decorators behave as expected.