cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE doesn't honor resource exclusion

MMill.6
Associate

Hi - I'm using the STM32CubeIDE v1.13.  Whenever I generate code from an .ioc then any resource exclusions I've made are removed/lost.  This was also true of v1.12 and previous versions.

Is there a way to persist the resource exclusions across code generations?  The code generation creates a new .cproject, where the exclusions reside.  This is a pseudo xml file.  Alternatively, is there a reliable way to edit this file programmatically - either from Python or a bat file?

 

3 REPLIES 3
Pavel A.
Evangelist III

Is there a way to persist the resource exclusions across code generations?

The simplest way, easiest to understand: after successful build of the project, commit the project files (.project, .cproject) to your version control. If a bad change happens because of repeated generation or whatever else - revert these changes. Easy, safe.

And what to do when one actually needs to regenerate the code? Merge the project file versions manually? :beaming_face_with_smiling_eyes:

Alternatively, is there a reliable way to edit this file programmatically - either from Python or a bat file?


C code is generated by another code - CubeMX application. CubeMX uses even more code - templates. You can see that such "automation" doesn't actually work. But, of course, the solution is to add yet another layer of code... :rolling_on_the_floor_laughing:

@Piranha Yes, I merge manually. Yes this takes what it takes. But not a rocket science.

@MMill.6 Yes, python standard library has modules to hack XML files. Hopefully you won't need this.