Debugging ARM Cortex-M Hard Faults with GDB Custom Command

In “A Processor Expert Component to Help with Hard Faults” I’m using a C handler with some assembly code, created with Processor Expert, to help me with debugging hard faults on ARM Cortex-M. Inspired by a GNU gdb script here, … Continue reading

Debugging ARM Cortex-M0+ Hard Fault with MTB Trace

And here it is again: a Hard Fault exception raised by the ARM Cortex-M0+ on my Freedom board: A reason for hard faults are for example dereferencing a NULL pointer. The issue with the ARM Cortex hard fault exception stack … Continue reading

A Processor Expert Component to Help with Hard Faults

Ahrg! Again my ARM application crashed somewhere and I ended up in a HardFault exception :-(. In my earlier post I used a handler to get information from the processor what happened. But it is painful to add this handler … Continue reading

Debugging Hard Faults on ARM Cortex-M

It is as bad as this: my application stopped in an unhandled interrupt service routine: That does not tell much. I’m using Processor Expert generated code, and with this all my ‘unhandled’ vectors are pointing the same handler:

Debugging ARM Cortex-M0+ HardFaults

To me, one of the most frustrating things working with ARM Cortex-M cores are the hard fault exceptions. I have lost several hours this week debugging and tracking an instance of a hard fault on an ARM Cortex-M0+ device.

Binary, do you use Hard-Float or Soft-Float?

The article discusses the use of floating point operations on ARM Cortex-M devices, highlighting the significance of checking for hardware support. It introduces the GNU readelf tool as a convenient way to determine if a binary file utilizes hardware for floating point operations. The tool can be especially beneficial for inspecting externally built binaries. Continue reading

Hardware Reset for ARM Cortex-M with Segger J-Link and Kinetis Design Studio

The reset and signal line of a microcontroller is probably the most important signal to a microcontroller. And if things go wrong, then a first thing to check is the reset line. So having control over reset is an important … Continue reading

Semihosting with VS Code on RP2040

With semihosting I can use standard I/O function like printf() and I can read and write data on the host through the debug connection. If used with care, this is a great feature especially for unit testing.

Catchpoints: Unlimited Number of FLASH Breakpoints with GDB

The hardware has a limited number of hardware breakpoints. This article shows how to use a unlimited number of breakpoints in flash, using GDB with a small script catching SIGTRAP signals. Continue reading