cancel
Showing results for 
Search instead for 
Did you mean: 

Which compiler do you use for programming STM32 MCUs?

fbakhtiyar
Associate II
Posted on December 19, 2015 at 09:22

Hi, 

I'm relatively new in programming microcontrollers and I'd love to ask which (free) IDE do you use for (offline) compilation and debugging? I'm using Mac OS X and already tried System Workbench with CubeMX generated project which seems to be too buggy even in simple functions. Using Eclipse IDE with arm-gcc-none-eabi compiler and open-ocd debugger looks okay but there're lots of thing I should do manually to make my code compiled properly. Another option is gcc4mbed, which is the open source project for offline mbed compiler, which I haven't tested yet.

Another thing I'd love to know is that, which library (HAL or StdPeripheralLib) is recommended to use as a professional? Also, should I really understand everything in register level to make my own code?

How do you proceed on this as an experienced professional? 

Many thanks in advance. Any help will save me a lot of time.

PS: I'm currently developing for STM32F103 for my project.

#!stm32
4 REPLIES 4
AvaTar
Lead
Posted on December 19, 2015 at 18:16

> I'm using Mac OS X ...

That seems a limiting restriction.

I don't know if the ''usual suspects'' like IAR, Keil, Rowley and Atollic have Mac versions, but most offer a size-restricted free version.

I'm not really aware of any free toolchain for your OS. EmBlocks and Coocox, two of the free IDEs coming to my mind, are restricted to Windows, AFAIK.

> ... already tried System Workbench with CubeMX generated project which seems to be too buggy even in simple functions.

 

That is not only your impression. Just look around in this forum, searching for issues with CubeMX. ST seems nonetheless dedicated to steamroll ahead, and bury the stable SPL in favour of the shaky Cube.

Not sure if they can keep it up, and personally, I hope not. But as a matter of fact, there is no SPL for newer MCUs, so you are condemned to Cube (or register-banging) if you use them.

And lastly, you can ignore any library, and bang on the peripheral registers directly. Very efficient, hardly readable and barely portable code is usually the result ...

Liviu Ionescu
Associate III
Posted on December 19, 2015 at 20:37

You can also consider the open source

http://gnuarmeclipse.github.io

.

It runs without problems on OS X, it provides ready to run STM32F templates, J-Link & OpenOCD debugger support, QEMU emulator and many more.

carmine
Associate II
Posted on December 20, 2015 at 09:33

If you want to use a free compiler tool-chain, then GCC + Eclipse + GNU ARM Eclipse plug-ins are the best stable and productive option, IMHO. Take a look

http://www.carminenoviello.com/en/2015/06/04/stm32-applications-eclipse-gcc-stcube/

 which briefly explain how to use those plug-in (even if the article is a little bit outdated). There is also a script that allows to import a C project generated with CubeMX inside an Eclipse project generated with the GNU ARM plugin.

http://www.element14.com/community/thread/48115/l/how-to-quickly-import-a-stm32cubemx-project

Moreover, even if the old StdPeripheralLib is still a valid solution to develop applications with STM32 MCUs, the HAL is now what ST officially supports and maintains. It is still no completely ''stable'', but I think that, if you are new to the ST world, it's not a good thing to start with a deprecated library.

Singh.Harjit
Senior II
Posted on December 20, 2015 at 19:48

I use Rowley's Crossworks system. I really like their debugger and the IDE.