Skip to main content
MMill.6
Associate
July 24, 2023
Question

CubeIDE doesn't honor resource exclusion

  • July 24, 2023
  • 1 reply
  • 1088 views

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?

 

    This topic has been closed for replies.

    1 reply

    Pavel A.
    Super User
    July 24, 2023

    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.

    Piranha
    Principal III
    July 24, 2023

    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:

    Pavel A.
    Super User
    July 25, 2023

    @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.