6+ IDEs to debug the $2 STM32 BluePill

wassimWassim wrote 04/02/2017 at 11:44 • 8 min read • Like

2018 Update

ST gets Atollic

Yes, "almost 2018", update. Interesting to see as noted @Hamish with the link he posted, STMicro acquiring Atollic IDE that was classified in this review as the most efficient. That makes sense.

VSCode rules over

Where did I end up six months after this review, well to be honest I rarely need to debug, but sometimes I do, so I stick with VSCode for all of the plugins, scm integration, workspaces, intellisense,... although I did not investigate the possibilitiy to configure its debug capabilties. I code with multiple languages and this unique interface really helps. I even can open netwrok paths e.g. "\\IOSERV\pi\IoT_Frameworks", so that I work on the raspberry pi samba shared folder seamlessly from windows.

mbed-os nice but patchy

For the SW stack, I also switched to mbed, it saves a lot of pain, I had to patch it in this fork to support the STM32 BluePill, did not manage to push the change due to complicated testing environment. From performance point of view some drivers are really ugly when it comes to real time, so I had to break the os spirit and hard code some registers to improve the efficiency, sometimes by a factor x50 (SPI, PWM,...). Code available in the 20ish Hello world samples, and parts of the STM32 dongle of the IoT_Frameworks.

debug only but debug good

And for the rare cases when I need to debug (with breakpoints), I got an original segger Edu with its Ozone, it is not meant for code editing, but switching for debug gives a full feature set.

So the dream of a unique IDE is still on going and keeps the below review still relevant.


First I'd like to thank Hackaday for this $2 32-bit Arduino (with debugging) so I decided to share my investigation about the IDEs where you could debug with more convenience.

The target Platform is the STM32F103C8T6 BluePill, used with a Nucleo board for the STLink-v2-1.

What is an IDE ?

Impressions Criteria

Small note about CubeMX

By the way, although CubeMX didn't work for me on the first time, going through it with the debugger helped me find a ridiculous configuration including both HSE and HSI flag at the same time, then I realized that it wasn't me but a known issue, so I added this note about it

void SystemClock_Config(void)
  RCC_OscInitTypeDef RCC_OscInitStruct;
  RCC_ClkInitTypeDef RCC_ClkInitStruct;
  RCC_PeriphCLKInitTypeDef PeriphClkInit;

/**Initializes the CPU, AHB and APB busses clocks */
// - Faulty line => RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE;
//replace by following line
  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
  RCC_OscInitStruct.HSEState = RCC_HSE_ON;


This is not a professional evaluation, just first impressions from a user experience, if something is wrong, please give feedback.


Conclusion : Most efficient

Gnu Arm Eclipse

source [find interface/stlink-v2-1.cfg]
transport select hla_swd
source [find target/stm32f1x.cfg]
reset_config srst_only

Conclusion : My Favorite Option, because it's the most open, most complete, most standard as Eclipse is THE reference for open source IDE, I'm sticking with this one, and would use others just for verification and compare from time to time. I admit that if someone would contribute to make a special pack for one click install of an STM32F1 support, that would be awesome, I don't know how to do that.

System Workbench

Conclusion : decent user experience, I keep it as alternative to compare if a bug arise or to check its eclipse config.

IAR Embedded Workbench for STM32

Conclusion : good IDE, but unfortunately not relevant as main platform for an open community, but keep it for quick, case specific debug.


Conclusion : cannot recommend, probably because I did not spent enough time as much as for the other alternatives, but I'd appreciate to see direct support for CubeMX and the BluePill STM32 which are getting more popular and I' using them as reference, then would have potential to become THE IDE.


Conclusion : THE IDE, if you are rich or just have money. Or why not stick to 32KB design when possible, the runtime behavior if not more might be impacted if you use it just for debug then move to another compiler.

More IDEs, Frameworks and Editors

To have a better understanding of what is platformIO and to compare Arduino, mBed and others, I started evaluating these frameworks in this project :

STM32 BluePill Frameworks Evaluation

STM32 BluePill Frameworks Evaluation

How to turn into an STM32 expert ?

From the community feedback I decided to add the good books references in this section. I will avoid listing in this section books that are more expensive than the BluePill itself.



Rock Deng wrote 07/24/2018 at 03:14 point

TrueStudio got lots of improvements and I think it will be the best IDE.

  Are you sure? yes | no

Hamish wrote 12/13/2017 at 12:16 point

Thanks for the useful write-up. Completely coincidentally - just yesterday STMicroelectronics announced the purchase of Atolic for USD 7M: It will be interesting to see what happens to STM's System Workbench going forward.

  Are you sure? yes | no

Wassim wrote 12/13/2017 at 17:01 point

Very interesting, we'll see how these will compete with Atom, VScode and PlantformIO with debug plugins.

  Are you sure? yes | no

Wassim wrote 04/09/2017 at 10:28 point

After evaluating so many IDEs, I'm currently more into custom environments where you use your favorite Source Editor with command line tools, I still did not solve the debug question, so for debug Eclipse is still the only alternative, but I'm sure not for long...

The platformIO is a very convenient environment to test multiple libraries and Frameworks, as it's a build tool that supports really all of them, so here I use it with VSCode to compare mBed, Arduino and others

  Are you sure? yes | no

Wassim wrote 04/05/2017 at 17:34 point

That's really cool, I didn't see that. But is it usable with any debugger or does it have to be with the J-Link, I think it is independent no ? I'll have a look.

  Are you sure? yes | no

diegooo666 wrote 04/06/2017 at 10:12 point

I use it with OpenOCD and stlink v2.1 so I guess it has nothing to do with J-Link.

  Are you sure? yes | no

Wassim wrote 04/06/2017 at 18:20 point

It's working now, it's always better when someone takes the time, and reads the doc.

  Are you sure? yes | no

diegooo666 wrote 04/07/2017 at 14:39 point

I'm glad i could help.

  Are you sure? yes | no


[this comment has been deleted]

Wassim wrote 04/04/2017 at 16:26 point

I'm planning to check it further, afterwards I would add a section for it, sounds as an interesting alternative.

  Are you sure? yes | no

Ubi de Feo wrote 04/04/2017 at 15:31 point

I have just dipped my toes into STM32, as most of the work I do doesn't need more than an ATMega or ATTiny, but am enjoying a book by Carmine Noviello: Mastering STM32.
In his book, published via LeanPub, he goes through the ins and outs of the platform and helps the user configure a full toolkit as well as becoming proficient at working with the line of devices.

I've been looking into some good books and this is the one I've liked the most at least based on its first 5 chapters.
The IDE configuration sections are really well done :)

  Are you sure? yes | no

Wassim wrote 04/04/2017 at 16:30 point

Thanks for the reference, if you can pay for it, that's a real professional value not like reading internet blogs :)

  Are you sure? yes | no

diegooo666 wrote 04/05/2017 at 09:25 point

The Definitive Guide to ARM Cortex-M3 and Cortex-M4 Processors by Joseph Yiu is also a highly recommended one to understand things in details.

  Are you sure? yes | no

MobileWill wrote 04/04/2017 at 15:20 point

Embitz (Based on Code::Blocks) is my favorite so far for STM32. Since it supports make files you could use it with anything. Only limitation is it is only for Windows. It also has support during debugging for RTOS tasks. When you create a new project it has support for many microcontrollers and I have been able to import a CubeMX project as well. 

  Are you sure? yes | no


[this comment has been deleted]

MobileWill wrote 04/04/2017 at 16:02 point

I have been using Atmel Studio and it is painful every time I have to compile to test something. I throw on Netflix/Youtube so I can watch while I wait for it to compile and flash. I should see if I can do SAMD in Embitz. Eclipse is written in Java so it has more overhead. 

  Are you sure? yes | no

Guido wrote 04/04/2017 at 12:39 point

What did you not like in System Workbench for STM32?

  Are you sure? yes | no

Wassim wrote 04/04/2017 at 16:35 point

Well, System Workbench is for me yet another eclipse based IDE, I'm happy to have it as reference, but if under the hood all is close to Eclipse, then the gnu arm plugins for Eclipse is a preferred solution as it's more standard environment. I think that the gnu arm eclipse is new and atollic is private, so without the gnu arm, then System Workbench would totally make sense.

  Are you sure? yes | no

Wassim wrote 04/04/2017 at 17:03 point

by the way, more detailed notes about System Workbench

  Are you sure? yes | no

Sheldon wrote 04/04/2017 at 09:54 point

On the Keil uV - I fell in to a similar trap; there is a free license for M0/M0+ support (specifically STM32F0 and STM32L0 - they're paid for by ST) but it then stops the size-limited support of other targets! (I was also wanted M3 support)

I'm not sure if it would support the "blue pill" board but it should certainly support the chip (I was even surprised that, while still code limited, it supported the high-end M7 cores) - it does support quite a wide variety of dev boards.

Also note, if you do install the special license, to remove it involves removing the license key from the ini file.

  Are you sure? yes | no

K.C. Lee wrote 04/04/2017 at 12:42 point

I played with the Lite version of Keil previously.  It supports everything including the blue pill and other more obscure stuff beyond development boards that few played with here. (I skip development boards and go straight to proto build.)

You can switch out the compiler to GCC (within the project) when your grow beyond the 32K limits. This is sufficient to get you to some sanity and basic code. The draw back to GCC is that you lose all the goodies and pretty much only using the IDE.  

I program in bare metal and used to squeezing my coding to old fashion 8-bit, so 32K is large enough for small projects. I have switched to the $0.44 STM32F030 supported by the free version and couldn't be happier.

  Are you sure? yes | no

Wassim wrote 04/04/2017 at 16:51 point

It's clear that switching the Keil to gcc would take the "power" out of it. Like on this project where I have a wireless and a fixed STM8 variants I'd like to replace the STM8S BluePill with the STM32 BluePill and the STM8L TSSOP20 with the STM32L0 LQFP32.

  Are you sure? yes | no

Wassim wrote 04/04/2017 at 16:38 point

Thanks for the hint of the ini file, I got stuck with the M0/M0+ variant, I'll try that and check with the M3.

  Are you sure? yes | no

Sheldon wrote 04/05/2017 at 08:09 point

This is the web page that explains it:

  Are you sure? yes | no

Wassim wrote 04/05/2017 at 17:17 point

Thanks for the hint and the link, it was trivial (after you know it), now it's working, you saved an STM32 life here :)

  Are you sure? yes | no