Mbed CLI development environment sharing thread

The good news is that the Mbed Studio IDE is steadily improving and I hope it will keep like that! But until it gets support for shared user libraries and debugging of all my targets my favorite development environmnet remains as below:

Operating system: Linux (Ubuntu 18.04 LTS at the present)

  • Compilation is much faster than on Windows and I cannot afford a Mac machine.
  • It has a powerful shell scripting and a lot of useful utility programs and tools for free!

Build system: Mbed CLI + GCC ARM toolchain.

  • Mbed CLI is Mbed’s native building tool.
  • Supports all Mbed enabled targets. I used to use the QbsProjectManager (a QtCreator plugin) but with that I was not able to keep up with the ever changing Mbed versions and new targets.

IDE: The QtCreator IDE and the STM32Cube IDE.

  • Qt Creator is an amazing IDE freely available on Linux. The editor can be switched to vim-style editing if one prefers so.
  • Allows to easily add new compilers, debuggers, make tools (supports Cmake too), kits and wizards to easily create new projects.
  • I use it to build also desktop applications (including Graphical User Interface design) and Arduino (AVR, ESP8266 and EPS32) programs.
  • But I have to admit that the IDE sometimes crashes, although, I have never lost a single file.
  • To utilize low level HAL functionalities on STM targets I use also STM’s great STM32Cube IDE when needed. Then I port the project to the QtCreator (or the online compiler) to add Mbed APIs.

Code analysis / verification tools: The QTCreator IDE can use the following Code Analyzer plugins

  • ClangStaticAnalyzer
  • Valgrind

Custom targets: Thanks to Johannes Stratmann (@JoJoS) for sharing his Custom Targets (targets and how to organize directories for custom targets) the Qt Creator allows to easily use custom targets too.

Debugger: pyOCD and OpenOCD

  • I use pyOCD (version 0.8.0) to debug targets equipped with DAPLink.
  • OpenOCD works great for debugging STM targets.

Flashing (program download) tools: I use the following utilities to flash my target boards

Programming/debugging probes:

  • USB to UART converter.
  • NUCLEO ST-LINK/V2-1 (detachable from NUCLEO boards).
  • ST-Link V2 USB dongle (aka ST-Link V2 Programming Unit).

Serial Terminal:

One can find more details about building and debugging offline on Linux with QtCreator IDE here.

4 Likes