2025-01-07 10:03 PM
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.
2025-01-07 11:45 PM
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
2025-01-08 02:45 PM - edited 2025-01-08 02:51 PM
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.
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.
2025-01-08 11:34 PM
Hello @miladmohtashamirad
You can send me your IOC in private .
I will be waiting for your feedback.
THX
Ghofrane