2020-03-08 01:02 PM
I'm new to CubeMX and I've read over the documentation a couple of times (speed reading) but can't quite find an answer.
My question is what files exactly are generated by the tool and what files are simply copied?
Is it the case that all files we find under the Drivers folder are copied files? copied from the installed HAL reference files?
Is it the case that ONLY truly generated files are put into the Src/Inc folders (that is the Src/Inc folders in the project root).
For example I see a file named stm32f4xx_hal_msp.c in the project root Src folder, if this was generated by CubeMX why does it not have some kind of comment block saying "generated by CubeMX v x.y.x on March 8 2020 at 1:01 pm as part of project ABC..." and so on? Or is it a copy of a HAL file that was customized in some way by CubeMX as part of the code generation phase?
I'm trying hard to figure what code is generated for a project and what code is simply consumed as is.
Thx
2020-03-08 01:46 PM
Basically it works this way:
So if you specify to link the library files rather than copy, almost all files found in the project directory are generated.
> For example I see a file named stm32f4xx_hal_msp.c in the project root Src folder, if this was generated by CubeMX why does it not have some kind of comment block saying "generated by CubeMX v x.y.x on March 8 2020 at 1:01 pm as part of project ABC..." and so on?
Because the generated files are meant to be customized (note the user sections marked by special comments).
Some people would hate extra noise in generated files.
Use a version control system to track changes in all project files, including generated ones.
-- pa