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:
[code light=”true”]
ST2Makefile.py <TrueSTUDIO project location>
[/code]
where you can identify TrueSTUDIO project location by locating “.project” and “.cproject” files inside it.
As usual, some useful resources:
Useful links
ST2Makefile: https://github.com/baoshi/ST2Makefile
ARM GCC: https://launchpad.net/gcc-arm-embedded
My packaged GNU Make for Win32: https://ba0sh1com.files.wordpress.com/2020/09/2c1c9-make.zip
I receive the following error now during compiling with the new tool. I have created a simple GPIO project called blah in CubeMX 4.7.1 and this is the result.
13:20:04 **** Incremental Build of configuration Default for project blah ****
make all
make: *** No rule to make target `build/system_stm32f1xx.o’, needed by `build/blah.elf’. Stop.
13:20:05 Build Finished (took 453ms)
Any thoughts?
Upgrading CubeMX 4.7.1 now. Can you send me the .ioc file for diagnose? mail (at) ba0sh1 (dot) com
File sent to you email.