Book Image

The Insider's Guide to Arm Cortex-M Development

By : Zachary Lasiuk, Pareena Verma, Jason Andrews
Book Image

The Insider's Guide to Arm Cortex-M Development

By: Zachary Lasiuk, Pareena Verma, Jason Andrews

Overview of this book

Cortex-M has been around since 2004, so why a new book now? With new microcontrollers based on the Cortex-M55 and Cortex-M85 being introduced this year, Cortex-M continues to expand. New software concepts, such as standardized software reuse, have emerged alongside new topics including security and machine learning. Development methodologies have also significantly advanced, with more embedded development taking place in the cloud and increased levels of automation. Due to these advances, a single engineer can no longer understand an entire project and requires new skills to be successful. This book provides a unique view of how to navigate and apply the latest concepts in microcontroller development. The book is split into two parts. First, you’ll be guided through how to select the ideal set of hardware, software, and tools for your specific project. Next, you’ll explore how to implement essential topics for modern embedded developers. Throughout the book, there are examples for you to learn by working with real Cortex-M devices with all software available on GitHub. You will gain experience with the small Cortex-M0+, the powerful Cortex-M55, and more Cortex-M processors. By the end of this book, you’ll be able to practically apply modern Cortex-M software development concepts.
Table of Contents (15 chapters)
Part 1: Get Set Up
Part 2: Sharpen Your Skills

Running and debugging

Gitpod works well for coding and building microcontroller software, but what about running and debugging it? This is more complex by nature since the Raspberry Pi Pico is on our desk and not physically attached to the Gitpod cloud instance.

Let’s take the scenario where the Raspberry Pi Pico is on my desk and connected to the Raspberry Pi 4. In Chapter 4, Booting to Main, we reviewed how to use openocd and gdb to connect, load, and run the hello world program on the Pico. We will use some of these concepts here as we work in Gitpod and use gdb to connect to and debug the dot product application. Review Chapter 4, if needed when following the next few steps:

  1. First, return to your Gitpod workspace – created either from the custom container image or the initialization commands – and build the application with debug settings:
    mkdir build ; cd build
    cmake -DCMAKE_BUILD_TYPE=Debug ..
  2. From a terminal on your local Raspberry Pi...