TrueSTUDIO STM32 project to GCC Makefile converter

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

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, now you should run: <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


My packaged GNU Make for Win32:

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?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s