cnoviello / CubeMXImporter

This tool can be used to import projects generated by STM32CubeMX tool inside an Eclipse project created with the GNU ARM Eclipse plugin
102 stars 28 forks source link

Added a sync-back feature of copying modified Application files back to CubeMX #12

Open MindMil opened 7 years ago

MindMil commented 7 years ago

This feature simply copies Application files from Eclipse folder back to CubeMX. It is useful in cases when you want to make some changes in CubeMX project and not loose your user code when you generate CubeMX again. Using this feature you may add your own code in sections marked by "/* USER CODE ..." in Eclipse and then still have them after regenerating the code in CubeMX. For this to work the flag "Keep User Code when re-generating" must be set in CubeMX's Project->Code Generator settings. The workflow to update CubeMX configuration and retain user code is following:

  1. Run cubemximporter with the --syncback argument
  2. Generate new code in CubeMX
  3. Run cubemximporter normally