Skip to main content
KayJay
Associate
November 25, 2020
Solved

STM32CubeIDE: Icon Decorators: exclude resource from build

  • November 25, 2020
  • 6 replies
  • 3389 views

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

This topic has been closed for replies.
Best answer by KayJay

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.

6 replies

Cartu38 OpenDev
Graduate II
November 25, 2020

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
KayJayAuthor
Associate
November 26, 2020

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

Cartu38 OpenDev
Graduate II
November 26, 2020

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.

KayJay
KayJayAuthor
Associate
December 15, 2020

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.

KayJay
KayJayAuthorBest answer
Associate
January 12, 2021

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.