Search code examples
stm32freertoscubemxstm32cubemxlibopencm3

What library or project generator to use for a first STM32F3 project?


I'm about to start my first STM32 project. (I have previously used atmega MCUs, and have decades of experience with C, mostly server-side.)

There seem to be three choices, given that I want to develop on the command-line in Linux, using make.

  1. an STM32CubeMX generated makefile project,
  2. an STM32CubeMX generated makefile project, including FreeRTOS, or
  3. a makefile project using libopencm3.

The application will process and send messages on 4 or more serial ports, using different protocols. Occasionally GPIOs will be set or cleared.

My questions are:

  • Why does libopencm3 exist? Why would someone choose it over an STM32CubeMX-generated makefile project.
  • Is learning FreeRTOS worthwhile for such a project?

Solution

  • There are no good free project generation tools that I know. I worked mostly with STM32CubeMX and I can tell you that it's surely useful (expecially for novices) but long from being something you can trust on. I found lots of bugs in it in the years, some has been fixed, others are still in there. IMHO, in general, you should use code generator tool with care better as a training instrument maybe taking snippets of code out of them.

    I've used FreeRTOS a lot and I can tell you I feel good with it. Maybe it's not good as as a commercial grade product but surely it's well documented and easy to handle. Haven't had any problem with it.