What tools you use for embedded development largely depends on which chip manufacturer you choose, along with the resulting CPU architecture. This post focuses largely on ARM Cortex processors.

Each of the chip manufacturers provides a suite of tools for creating, editing and testing your projects, however the editing experience can leave much to be desired and the projects can be difficult to manage as they grow in size. Embracing modern cross-platforming tooling can open up a whole set of new ways to build and manage your projects.

Operating System

When it comes to operating system support, many of the tools target the main three; Linux, macOS and Windows. There is of course tooling that targets a single OS, such as IAR Embedded Workbench, however these tend to be the exception.

For the purpose of this post, I will be focusing primarily on cross-platform tooling

Git

The first tool you need to install is Git. Git is the most common version control system available today and is the backend for GitHub and Azure DevOps. Regardless of whether you are using hosted Git, or hosting your own, the first thing you want to do is setup your repository to store your code along with all changes.

The learning curve for Git can be steep, however there are tools (such as VSCode) available that provide a simplified interface that can get you through some of the more common everyday tasks.

CMake

CMake is a textual based build system, that lets you define the hierarchy different targets within your project and how they combine together to form your final executables. At a high level there are two parts to the system; Define the libraries and executables, Define the toolchain

Some of the benefits of using CMake compared to a traditional GUI build environment are:

  1. No more searching through GUI menus trying to figure out how to disable/enable a particular feature
  2. Multiple build targets (debug/release) are easy and usually contained within the toolchain definition
  3. Create your build system once and pull in different compilers by passing in a different toolchain

Learning CMake can be daunting task and can push you out of your comfort zone compared to a visual file hierarchy and a menu of predefined options, however I believe the pros outweigh the cons.

For a more in-depth understanding of creating a toolchain, read Embedded Development with CMake and Arm GCC.

Ninja

Ninja goes hand-in-hand with CMake to build the final executables, however it is a separate install so worth calling out. Designed to run builds as fast as possible, its perfect for building projects containing many files, which can be the case if you are incorporating an RTOS such as Azure RTOS or FreeRTOS as well as other embedded development libraries like the HAL.

Build Chain & Debugger

The compiler and linker and parts of the build chain most often used when building your embedded binary. The compiler will convert the source code into object files, and the linker will combine all the object files together into the resulting final binary.

For the Arm architecture, there are three main compilers to choose from for embedded development:

  • GNU: GCC toolchain built distributed by Arm (Free)
  • IAR: IAR Embedded Workbench (Paid)
  • Keil: Keil MDK (Paid)

VSCode with Extensions

My favorite editor for Embedded development is VSCode. Tied together with extensions below, it provides a complete editing / debugging environment for most users.

  • CMake Tools: Integrated support for CMake providing native build support.
  • CMake: Syntax highlighting and auto-completion for editing CMake files
  • C/C++: IntelliSense and debugging support for C and C++
  • Cortex-Debug: Debugging support for ARM Cortex-M MCU's though J-Link and OpenOCD
  • Embedded Tools: A new debugging environment in Preview that provides similar capabilities to Cortex-Debug with a focus on supporting Azure RTOS and FreeRTOS

Download Links

  1. Git
  2. Arm GNU Toolchain
  3. CMake
  4. Ninja
  5. VSCode