cancel
Showing results for 
Search instead for 
Did you mean: 

"Delete previously generated files when not regenerating" not working for some libraries


Comparing CMake projects with STM32CubeIDE projects shows many unused libraries added as source for CMake project:

  • \Drivers\CMSIS\DSP (44.7MiB)
  • \Drivers\CMSIS\Core (1.8MiB)
  • \Drivers\CMSIS\NN (1.5MiB)
  • \Drivers\CMSIS\RTOS2 (112.KiB)
  • \Drivers\CMSIS\RTOS (40.0KiB)

Total size of these extra unused files is 48.1MiB. I think this is because initially I selected "Copy all used libraries into the project folder" (I think this is the default option). But when I check "Copy only necessary library files" they won't be removed when regenerating. Despite "Delete previously generated files when not regenerating" being checked.
If I delete them and generate again then they won't be added again and build works fine. So they clearly are not needed.
I'm using the latest version: STM32CubeMX V6.15.0

 

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.
3 REPLIES 3
Ghofrane GSOURI
ST Employee

Hello @unsigned_char_array 

Thank you for your valuable contribution.

The issue has been escalated to the development team for resolution.

The internal ticket number is: 218909.

 

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.

Andrew Neil
Super User

@unsigned_char_array wrote:

when I check "Copy only necessary library files" they won't be removed when regenerating. Despite "Delete previously generated files when not regenerating" being checked.


Maybe they don't count as generated files?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

@Andrew Neil wrote:

@unsigned_char_array wrote:

when I check "Copy only necessary library files" they won't be removed when regenerating. Despite "Delete previously generated files when not regenerating" being checked.


Maybe they don't count as generated files?


The unused files in the drivers Drivers are not "generated" either, but also copied unmodified. But these files are removed when I check "Copy only necessary library files". So this is an inconsistency.
Perhaps those files are not counted as libraries, but MCU specific files and the DSP files are counted as libraries. It perhaps only copies them, but doesn't uncopy them.
Maybe that would require a checkbox "Delete previously copied library files when no longer used".
Either way from a user perspective I think a bare blinky project doesn't need nearly 50MiB of source files. It clutters my git repo.

Kudo posts if you have the same problem and kudo replies if the solution works.
Click "Accept as Solution" if a reply solved your problem. If no solution was posted please answer with your own.