Breakpoints
This section will delve into the topic of breakpoints. We will learn what they are and how invaluable they are for any debug approach.
What are breakpoints?
Breakpoints are specific points in a program where code execution is intentionally stopped. This allows the developer to inspect specific code areas and verify the system's state.
They are a very valuable and flexible resource for debugging in general.
In host PC environments, we usually have an infinite number of breakpoints available to us, but as always, on embedded systems, things are a bit different. Host environments have the advantage that usually, the executed application code is fully loaded into RAM, which is volatile memory and thus easily readable and writable. When you set a breakpoint, for example, in an IDE, the debugger will replace the instruction in RAM at that position with a so-called breakpoint instruction. If the processor hits such a breakpoint instruction, it will immediately stop further code...