• 6+ IDEs to debug the $2 STM32 BluePill

    04/02/2017 at 11:44 25 comments

    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 ?

    • Minimal formula for an Integrated Development Environment

    • the separation between the flash and debug is important as a flash can happen with any interface running from the application itself or as a bootloader, Over The Air or other,...
    • needless to argue about if an IDE is really helping or making things more clumsy, less open, so I'd simply say that the more an IDE sticks with open standard the richer it would get and the more plugin you'd see around it => e.g. Eclipse

    Impressions Criteria

    • How quick and easy do I get it running, if I mange to get it working at all.
    • How easy can I import STs CubeMX generated code.
    • How easy do I get the debugger working.
    • Debugger possibilities, peripheral view,...

    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.


    • link : TrueStudio
    • OS : windows / Linux / Mac
    • Supported by CubeMx
    • Eclipse based
    • Supports STLink
    • Debug even with peripherals
    • From Atollic, free, no size limit, but commercial approach for locking features, ads, waiting window...
    • Can debug the peripherals

    Conclusion : Most efficient

    Gnu Arm Eclipse

    • link : gnuarmeclipse
    • OS : Windows / Linux / Mac
    • CubeMX needs a converter CubeMXImporter
    • Free and open perspectives, no commercial purpose behind it.
    • I managed to make OpenOCD work with it, but far from beeing out of the box, very long install procedure of scattered SW, I had to understand how OpenOCD works to know how to pass the config file as argument,...here is my config options : -f "bluepillF103.cfg" (content below)
    source [find interface/stlink-v2-1.cfg]
    transport select hla_swd
    source [find target/stm32f1x.cfg]
    reset_config srst_only
    • Debug is fine, and very important is to include the Pack so that it's possible to debug the peripherals, reading the doc carefully is very very important, otherwise just stick with another IDE, the pack manager help file that I missed in the first install (also here thanks diegooo666 for the hints).

    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

    • link : OpenSTM32Community
    • OS : Windows / Linux / Mac
    • supplied by ac6 but strong link with ST to provide it as an open source alternative.
    • CubeMX support of course.
    • works with OpenOCD

    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

    • link : IAR EW
    • OS : apparently Windows only
    • No room for comparison, best user experience, all is out of the box
    • CubeMX support
    • down side is that does not come for free, not at all, but relevant as a...
    Read more »