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:

Useful links

ST2Makefile: https://github.com/baoshi/ST2Makefile
ARM GCC: https://launchpad.net/gcc-arm-embedded

My packaged GNU Make for Win32: http://www.ba0sh1.com/wp-content/uploads/2013/05/make.zip

3 thoughts on “TrueSTUDIO STM32 project to GCC Makefile converter

  1. 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?

    Reply

Leave a Reply