-
Book Overview & Buying
-
Table Of Contents
Practical Debugging for Embedded ARM Systems
By :
Have you ever wondered how embedded debugging works, or if you are making most of the setup that is already available to you?
Well, then you picked up the right book as these are the questions I will try to answer.
My main motivation to write this book was realizing that there is an astonishing knowledge gap within the embedded community when it comes to debugging. Be it students just getting into the domain or even well-versed software engineers that already work and produce code in that domain for a couple of years.
A big portion of embedded software engineers have not learned about the different debug techniques and features that are available to them. In most university curriculum it is merely a sidenote and in the best-case scenario one might learn about printf-debugging. So, all knowledge that is available is typically learned on the job.
To fill that gap, I created this book with the goal of providing information that, in my opinion, is not available in a condensed form out there.
The other more self-preserving motivation is a direct implication of sharing this knowledge. Chances are that I will be using products at some point developed by you or other readers and the better you are equipped to debug code faults, the better and safer the products should be. Or at least I hope so.
At the end of the book, you should be equipped with a broad arsenal of various debug features and methods which you can apply to real-world scenarios. While the books' focus is on the Arm chip architecture and its debug features, the concepts and features that are introduced in this book are usually universally applicable to the embedded domain.
The book will offer various visualizations, videos, and example code to be able to follow along through the different debugging techniques and features.
It is, however, not meant as "yet another how-to guide", so be aware that some basic background knowledge may be required.
This book is for intermediate embedded developers who already know how to build and flash ARM-based firmware but want to level up their debugging skills. It is ideal for firmware engineers, embedded software developers, and engineers transitioning from basic development to professional, tool-driven debugging workflows.
Chapter 1, A Brief History of Embedded Systems Debugging, covers the history embedded systems debugging. From the early beginnings to modern debug tools and trends.
Chapter 2, What Is Debugging and Why Should You Care?, defines what debugging generally is and how it can be integrated into embedded development workflows. The chapter will cover basic setup components, their typical price ranges, and the various debug interface standards.
Chapter 3, Basic Debugging Features, introduces the basic debug concepts and features which are available on most modern embedded devices. This chapter will show concepts on how to tackle certain issues with each feature and how it can be used to the developer's advantage.
Chapter 4, Advanced Debugging Features, expands the previous chapter and introduces more advanced debug concepts. While some of these features may not always be available or are more expensive to use, they can give a valuable deeper insight in your running system.
Chapter 5, From Theory to Practice, focuses on common real-world issues and shows the reader how the learned debug features and techniques can be applied most effectively to quickly remove these common bugs.
Ideally you already have basic knowledge about Arm microcontrollers and how they generally work.
In Chapters 4 and 5, there will be example projects, which you can follow along if you want to. However, it is completely optional as all scenarios and features introduced in this book will be accompanied by screenshots, detailed explanations, and sometimes even videos, so it is not required to try to follow the examples with your own setup.
But to include all learning types, here is the hardware and software requirements if you plan on replicating the scenarios from the book:
The code bundle for the book is hosted on GitHub at https://github.com/PacktPublishing/-Practical-Debugging-for-Embedded-ARM-Systems. We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing. Check them out!
We also provide a PDF file that has color images of the screenshots/diagrams used in this book. You can download it here:https://packt.link/gbp/9781806673117.
To check out the live demonstration of examples, go tohttps://packt.link/jDMTz, or scan the following QR code:

There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. For example: "We comment out _DivideByZero() and comment in _IllegalWrite()."
A block of code is set as follows:
Break.SetOnSrc ("main.c:61");
Break.SetOnSrc ("SEGGER_THUMB_Startup.s:199");
//
// Set Function which should be executed once BP is hit
//
Break.SetCommand("main.c:61","OnBPHitMain");
Break.SetCommand("SEGGER_THUMB_Startup.s:199","OnBPHitExit");
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
Break.SetOnSrc ("main.c:61");
Break.SetOnSrc ("SEGGER_THUMB_Startup.s:199");
//
// Set Function which should be executed once BP is hit
//
Break.SetCommand("main.c:61","OnBPHitMain");
Break.SetCommand("SEGGER_THUMB_Startup.s:199","OnBPHitExit");
Any command-line input or output is written as follows:
terraform init
Bold: Indicates a new term, an important word, or words that you see on the screen. For instance, words in menus or dialog boxes appear in the text like this. For example: "You can do that in Ozone via Tools| Trace Settings | Trace Source | Trace Pins."
Warnings or important notes appear like this.
Tips and tricks appear like this.
Feedback from our readers is always welcome.
General feedback: If you have questions about any aspect of this book or have any general feedback, please email us at [email protected] and mention the book's title in the subject of your message.
Errata: Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you have found a mistake in this book, we would be grateful if you reported this to us. Please visit http://www.packt.com/submit-errata, click Submit Errata, and fill in the form.
Piracy: If you come across any illegal copies of our works in any form on the internet, we would be grateful if you would provide us with the location address or website name. Please contact us at [email protected] with a link to the material.
If you are interested in becoming an author: If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, please visit http://authors.packt.com/.
Change the font size
Change margin width
Change background colour