-
A Deep Dive into ARM Cortex-M Debug Interfaces
In this article we will walk up through the hardware and software stack that enables debugging on
ARM Cortex-M
devices, demystify what is actually happening and go through a step-by-step example, tracing a basic debugger operation end to end using a logic analyzer. -
Bluetooth Low Energy: A Primer
In today’s post, we will be covering one of the most popular low-power IoT technologies: Bluetooth Low Energy (BLE). We will give an overview of how BLE works, dig into each protocol layer, and walk you through an example setting up BLE on a Nordic nRF52 microcontroller.
-
Using Python PyPi Packages within GDB/LLDB
In a previous post, we discussed how to automate some of the more tedious parts of debugging firmware using Python in GDB Scripts. To make these commands more powerful, one could use third-party packages from Python’s PyPi repository. In this post, we will discuss how to properly setup GDB, Python, and optionally virtualenv and then modify the
uuid_list_dump
command from the post mentioned above to make use of a third party package installed through PyPi. -
Fix Bugs and Secure Firmware with the MPU
Many ARM MCUs implement an optional unit, known as the Memory Protection Unit (MPU), which lets you control how regions of memory are accessed. In this article, we will deep dive into the unit and walk through a few practical examples of how it can be used to prevent bad memory accesses and security exploits on Cortex-M devices.
-
Get the most out of the linker map file
In this article, I want to highlight how simple linker map files are and how much they can teach you about the program you are working on.
-
Automate Debugging with GDB Python API
Previously we discussed how a significant portion of developer time is spent debugging firmware and how GDB can be a powerful utility for this. In this article we will discuss how to become more efficient at debugging by leveraging GDB’s Python API.
-
From Zero to main(): Demystifying Firmware Linker Scripts
Last time, we talked about bootstrapping a C environment on an MCU before invoking our
main
function. One thing we took for granted was the fact that functions and data end up in the right place in our binary. Today, we’re going to dig into how that happens by learning about memory regions and linker scripts. -
Tools for Firmware Code Size Optimization
In this series of posts, we’ll explore ways to save code space and ways not to do it. We will cover compiler options, coding style, logging, as well as desperate hacks when all you need is another 24 bytes.
But first, let’s talk about measuring code size.