Since I wrote the STM32CubeMX to Makefile converter, a lot of people have been helping to improve the project. Thanks! Meanwhile I also heard a lot of complaints about the quality of STM32Cube codes, for example, the thread here. Although I believe STM32Cube’s quality will eventually improve, at the moment there are still applications for the good old “Standard Peripheral Library” and other ST middlewares. Therefore I wrote another program, that converts most of ST’s example project into Makefile project.
The new utility, named ST2Makefile, is available on https://github.com/baoshi/ST2Makefile
My limited testing shows it works for most example projects in ST’s library package, as well as STM32CubeMX exported projects. One thing needs tweaking could be that some ST’s example project contains duplicated source files. If you receive error message such as “Symbol already defined in XXX” during linking, please check the SRCS section for any duplicated source entries.
The usage is changed a little since CubeMX2Makefile.py, now you should run:
ST2Makefile.py <TrueSTUDIO project location>
where you can identify TrueSTUDIO project location by locating “.project” and “.cproject” files inside it.
As usual, some useful resources:
My packaged GNU Make for Win32: https://ba0sh1com.files.wordpress.com/2020/09/2c1c9-make.zip