Help managing STM32CubeMX auto-generate makefiles
Hi all,
We are currently using STM32CubeIDE projects autogenerated from STM32CubeMX as part of our development. The issue with STM32CubeIDE projects is that automating and scripting builds with it is cumbersome even with the CLI interface.
I would like to explore using the auto-generated makefile option but there seems to be no clear documentation on:
- Adding my own headers/source files to the makefile?
- What happens if I regenerate the Makefile after adding a new peripheral through CubeMX?
- If I want to use both generated STM32CubeIDE projects and Makefile, how do I keep them both in sync in terms of my own code (not generated by CubeMX)
As a start I have played around with adding some source files into the generated makefile and re-generating after adding a new peripheral. At the moment the new source/includes required by the newly added peripheral would just be appended after the SRC list in the makefile. This works as a start but I don't think this is maintainable since it's not known which parts of the makefile are free to edit or will be replaced when the project is regenerated.
If anyone could share some tips or experiences from their own workflow that would be greatly appreciated.
