Skip to main content
Associate III
January 8, 2025
Question

CubeMx (stm32cubeIDE) code generator doesn't remove deselected component

  • January 8, 2025
  • 1 reply
  • 658 views

Hi. 
I've created a cmsis-pack that contains a component with two variants. both variants are providing a bunch of .c and .h files plus a .a file that is copied into the project. The problem is that when I (or the pack user) wants to change the variant in component selector and re generate the code, CubeMx deletes all the .c and .h files from the deselected variant but not the .a file. the .a library file stays there and the linker picks that file and uses that instead of the selected variant. unless I (or the user) manually deletes the old variant directory. 

Is this a bug? or there's something that I need to implement in my cmsis-pack?

Kind regards,
Milad.

1 reply

Ghofrane GSOURI
Technical Moderator
January 8, 2025

Hello @miladmohtashamirad 

Thank you for posting.

Could you please provide more details about the version of CubeMX and STM32CubeIDE that you are using, as well as your operating system?

I would appreciate it if you could share your IOC file so that I can investigate this issue further.

THX

Ghofrane

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Associate III
January 8, 2025

Hi @Ghofrane GSOURI ,
I'm using STM32CubeIDE 1.17.0 with cubeMX 6.13.0-RC5 in windows 11.
Is it possible to figure out this issue without the ioc file? (as it's something that we haven't publicly released yet.) 
or is it possible to send it privately to you?
This is how it looks like when I switch from one variant to the other. 

miladmohtashamirad_0-1736376140335.png
I also noticed that it even keeps the path for the library when linking:
-L../Middlewares/Third_Party/mycompany_mypack/libours/lib/arm-cortex-m33f
-L../Middlewares/Third_Party/mycompany_mypack/libours/Varian1/with_some_functions/lib/arm-cortex-m33f
-L../Middlewares/Third_Party/mycompany_mypack_mypack/libours/Varian1/with_some_functions/lib/arm-cortex-m33f
-L../Middlewares/Third_Party/mycompany_mypack_mypack/libours/Varian2/with_some_functions/lib/arm-cortex-m33f

Kind Regards,
Milad.

 

Ghofrane GSOURI
Technical Moderator
January 9, 2025

Hello @miladmohtashamirad 

You can send me your IOC in private .

I will be waiting for your feedback.

THX

Ghofrane

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.