Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Events
Videos
Audiobooks
Packt Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Practical Debugging for Embedded ARM Systems
Practical Debugging for Embedded ARM Systems

Practical Debugging for Embedded ARM Systems: Core techniques for tracing, profiling, and fixing system-level faults

Arrow left icon
Profile Icon Nino Vidović
Arrow right icon
€21.59 €23.99
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3 (2 Ratings)
eBook Apr 2026 176 pages 1st Edition
eBook
€21.59 €23.99
Paperback
€29.99
eBook + Subscription
€24.99 Monthly
Arrow left icon
Profile Icon Nino Vidović
Arrow right icon
€21.59 €23.99
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3 (2 Ratings)
eBook Apr 2026 176 pages 1st Edition
eBook
€21.59 €23.99
Paperback
€29.99
eBook + Subscription
€24.99 Monthly
eBook
€21.59 €23.99
Paperback
€29.99
eBook + Subscription
€24.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Practical Debugging for Embedded ARM Systems

1

A Brief History of Embedded Systems Debugging

Embedded systems debugging is an extensive topic that is crucial to the modern embedded domain. In this book, I want to teach you why debugging is crucial, which fundamentals are important, and introduce more advanced debug topics such as instruction tracing and power profiling. You will learn about various debug features and techniques, and by the end of the book, you should be capable of applying the newly acquired knowledge to tackle real-world problems.

The book will give concise, sufficient information to provide a solid understanding of each topic, and include references and keywords for further, deeper study if desired.

Before getting into the technical details of embedded systems debugging, I want to start off with a little bit of historical background, so we can better understand how we got to the technologies that we have today, and maybe also gain some appreciation for the people who came before us and have paved the path for what we are using today.

In this chapter, we'll cover the following topics:

  • Early beginnings of embedded systems
  • The birth of debugging tools
  • Evolution of programming languages
  • The rise of Integrated Development Environments (IDEs)
  • Modern challenges and trends

Your purchase includes a free PDF copy + exclusive extras

Your purchase includes a DRM-free PDF copy of this book, 7-day trial to the Packt+ library (no credit card required), and additional exclusive extras. See the Free benefits with your book section in the Preface to unlock them instantly and maximize your learning.

Early beginnings of embedded systems

In the beginning, there was chaos and uncertainty. Systems were running raw byte code, and debug interfaces were scarce or even nonexistent.

Arguably, one of the first embedded systems was the Apollo Guidance Computer (AGC), which was released in 1966 and was used for multiple Apollo missions [1].

It featured a tightly integrated system with very capable hardware specifications for its time.

  • 1 MHz CPU clock speed
  • ~69 kB of ROM
  • ~3,8 kB of RAM
  • 32 kg total system weight

By today's metrics, the clock speed may appear very low, but surprisingly, the typical memory sizes of modern microcontrollers are sometimes still of a similar magnitude as the APC's memory was.

But we all know about the famous success of the Apollo missions, so while these resources appear microscopic these days, they were plentiful for their intended purpose.

Figure 1.1: Front view of the AGC

Figure 1.1: Front view of the AGC

However, debugging the software that was running on the system was tedious due to the lack of proper debug features that were integrated into the chip's architecture. Typically, debugging was done indirectly via light indicators or simple print statements to a terminal.

Luckily, analyzing the assembly source code manually was relatively straightforward as the complete available memory was just 2,048 words. Even though the application featured a rudimentary RTOS and multiple algorithms for different calculation tasks, it could be analyzed quickly.

The birth of debugging tools

Over time, in the 1970s, system-specific software debuggers (monitor debuggers) started appearing that allowed inspecting memory locations, using breakpoints, and controlling the execution flow of the program.

However, these debuggers resided in the system's memory, and on resource-constrained systems, it was not ideal.

Next, in the 1980s and 1990s, we saw the birth of in-circuit emulators (ICEs). These huge boxes allowed interacting with a target system directly, making debugging tasks in real-time possible [2].

Debug interfaces such as JTAG additionally standardized approaches to debug environments for embedded systems, bringing costs down [3].

Evolution of programming languages

Initially, there was just machine code for computers. To make them more readable for humans, assembly language was introduced in the 1960s. It was predominantly used in the embedded domain in the beginning, due to the very resource-constrained systems and precise control over hardware.

Then C was invented in 1972. It allowed structural programming on embedded systems with a balance between high-level software abstraction and low-level hardware access. Until this day, C is still the most used programming language for embedded systems [4].

During the 1980s, the first object-oriented programming language, ADA, was introduced with the main goal of code safety and maintainability. That is why it was mostly utilized in avionics [5].

In 1985, C++ was released, another object-oriented approach, which initially did not have embedded real-time systems specifically in mind but gained much popularity over the years due to its flexibility and great language support [6].

In the 1990s, Java was introduced to the software world, promising excellent cross-compatibility over all available platforms. It took over the world of general computing quickly, and for embedded systems, it paved the way for modern smartphones and IoT devices [7].

At the same time, scripting languages such as Python started to gain more popularity. These days, Python is one of the most popular programming languages and can even be cross-compiled to embedded systems as well [8].

With its very simple and easy to learn syntax, Python has taken over many software engineering disciplines in a flash.

In the 2010s, Rust was introduced, and while it took some time to be established in the embedded domain, its innovative ownership model for memory management promised memory-safe applications, eliminating some of the most common bug types in the software development domain [9].

The rise of Integrated Development Environments (IDEs)

Most debugging was initially done via terminal prints and command-line interfaces.

Build systems were usually separate systems, making testing code iterations cumbersome.

To improve this situation in the 1980s, so-called Integrated Development Environments (IDEs) were introduced, making code writing, building, and debugging all happen inside the same, usually GUI-based tool.

This not only streamlined development setups but also gave tremendous advantages in the time-to-market race.

Figure 1.2: Turbo C IDE

Figure 1.2: Turbo C IDE

Here, we can see one of the first C IDEs, called Turbo C, which was available for DOS systems. It featured a text editor, project management features, a debugger, a build environment, and much more.

However, specifically at the beginning, using IDEs was frowned upon as experienced users argued that IDEs would limit their creative freedom [10].

But as history shows us, IDEs came to stay and are available these days on many systems in many flavors, for all kinds of programming languages.

Modern challenges and trends

So far, we have learned about the past of embedded systems debugging. We came from rather rudimentary debug features and environments to rather sophisticated setups with plentiful features.

But what does a modern landscape in the 2020s look like, and what are the current challenges and trends?

One great development is that nearly all modern microcontrollers that are released these days have debug ports integrated, even with some advanced debug features that go along with it. This led to a great availability of all kinds of debug probes that offer solutions for a broad range of budgets and chip architectures.

There are even on-board variants available, so whole debug probes can be tightly integrated into your own board designs.

The broad availability of debug interfaces and probes with advanced debug features makes bug hunting as efficient as it has ever been before.

Features such as hardware and software tracing, live memory manipulation, various breakpoint types, and many more will be covered in this book in more detail, so you can make the most of these modern features that are available even on the cheapest microcontrollers these days.

However, we also see that target systems are becoming increasingly complex. Multi-core devices are becoming the norm, complex memory management schemes become necessary, and advanced safety features increase the learning curve for newcomers to the embedded domain. So, having advanced debug setups becomes a necessity at some point.

To counter the trend of more complex devices, we see an increasing trend of third-party hardware abstraction layers and code generators being used to reduce the initial complexity of a new system. The trade-off is, however, that third-party code blobs are added to your software, where the chain of trust may become watered down, which, in the worst case, may add unwanted security risks to your application.

We also see the rise of embedded frameworks such as Zephyr that take the abstractions even further. Whether eliminating hardware dependencies will be the cure for future complex embedded systems, only time will tell, but it is definitely an approach that you should use consciously, as program safety is also becoming a core factor of modern embedded systems.

Another popular trend is the rapid rise to fame of Visual Studio Code from Microsoft. Starting off as a feature-rich free text editor with a plugin interface and built-in community features, it quickly transformed into a one-size-fits-all platform for modern software development, even in the embedded domain, challenging market-leading IDEs.

A more classic approach to counter complexity that is gaining much ground in the embedded domain is automated unit testing on embedded systems. Typically, such tests are run in separate simulation environments, oftentimes in the form of digital twins. However, many have now painfully learned that nothing beats testing on the actual hardware. Due to short prototyping cycles, quick availability of PCBs is becoming the norm, thus allowing testing on hardware early in a development cycle.

Last but not least, there's artificial intelligence (AI) in the form of large language models (LLMs). It is here now, so we have to talk about the elephant in the room. It can already write mostly correct code. It can somewhat debug broken code, but what it excels at is being a valuable assistant to an experienced developer. Even in the embedded domain where the training data for AI models is quite scarce and not always easily machine-readable, many of the suggestions and help you can receive from AI can still boost your productivity, and most importantly, it saves precious time when digging through thousands of pages of documentation, because what LLMs do best is pattern recognition of language context.

But what current LLMs also do very well is hallucinate answers, since current AI companies tune their models to give the user answers that would make them happy to keep engagement with the platform high, instead of always providing accurate information.

That is, of course, not ideal if you are trying to get a correct answer in a mostly deterministic profession such as software engineering. But LLM companies promise that this will all be fixed soon, and we just have to wait a bit longer.

History seems to be on their side, as so far, anything that humans could think or dream of in the technical domain was at some point later realized, so the chances are good that this will also happen with AI. But whether it will happen during my lifetime, I do not know. I am still waiting for cold fusion and teleportation.

But let's focus on reality and on what we humans do best – teaching each other new things, which, hopefully, will be achieved by the end of this book.

Summary

In this chapter, we learned about the history of embedded systems debugging, from the early beginnings, the first actual embedded systems, to modern interfaces, programming languages, and debugging tools.

Next, let's try to find out exactly what debugging is, why it is important, which peculiarities appear in the embedded domain, and what kind of debug interfaces exist.

References

  1. The Virtual AGC Project Spaceborne Computer Systems: https://www.ibiblio.org/apollo/#gsc.tab=0
  2. Debugging stories: from printf, just Flash and beyond, Erol Simsek, 2022: https://www.embedded.com/debugging-stories-from-printf-just-flash-and-beyond
  3. IEEE Standard for Test Access Port and Boundary-Scan Architecture, IEEE Std. 1149.1-2013, 2013. IEEE.
  4. Ritchie, D. M., & Kernighan, B. W. (1988). The C programming language (2nd ed.). Prentice Hall.
  5. Burns, A., & Wellings, A. J. (2007). Concurrent and Real-Time Programming in Ada. Cambridge University Press.
  6. Stroustrup, B. (2013). The C++ programming language (4th ed.). Addison-Wesley.
  7. Gosling, J., Holmes, B., & Steel, G. (1996). The Java Language Specification. Addison-Wesley.
  8. Lutz, M. (1996). Programming Python (1st ed.). O'Reilly Media.
  9. Klabnik, S., & Nichols, K. (2018). The Rust Programming Language. No Starch Press.
  10. Raymond, E. (2003). The Art of Unix Programming

Get this book's PDF version and more

Scan the QR code (or go to packtpub.com/unlock). Search for this book by name, confirm the edition, and then follow the steps on the page.

Image

Image

Note: Keep your invoice handy. Purchases made directly from Packt don't require an invoice.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Explore advanced debugging tools like hardware tracing and power profiling
  • Learn techniques for analyzing bootloaders, RTOS, and memory issues
  • Apply practical debugging workflows based on ARM Cortex-M firmware examples

Description

Are you truly unlocking the full potential of your embedded debugging tools? This hands-on guide cuts through the confusion of common workflows and shows you how to trace, profile, and debug ARM-based systems like a professional firmware engineer. Written by an industry expert, this book guides you through practical debugging scenarios using real hardware setups. You’ll explore both essential and advanced techniques, from setting breakpoints and analyzing memory to using hardware tracing, power profiling, and RTOS awareness. Through real-world crash analysis, you'll learn how to detect stack overflows, communication errors, memory leaks, and more. You will explore practical examples based on ARM Cortex-M target devices, which help you build structured and efficient debugging workflows. The learned skills can then be easily applied to other chip architectures as well. You’ll walk away with a clear understanding of the tools available, how to apply them in complex firmware projects, and the confidence to tackle even the most elusive bugs in production systems. Whether you’re refining your setup or debugging embedded systems at scale, this book will sharpen your skills and elevate your embedded development workflow. *Email sign-up and proof of purchase required

Who is this book for?

This book is ideal for embedded developers and firmware engineers working with ARM-based systems who want to improve their debugging workflows. It is not just a beginner’s guide, but a practical resource for those already familiar with building and programming embedded firmware. Whether you’re debugging bootloaders, analyzing RTOS behavior, or using advanced hardware tools, this book will help you streamline your workflow and solve complex issues with confidence.

What you will learn

  • Set up a debugging workflows for ARM-based embedded systems
  • Trace firmware execution using hardware tools
  • Analyze stack, memory, and registers
  • Debug bootloaders and bare-metal applications confidently
  • Identify issues with power, interrupts, or RTOS
  • Detect memory leaks
  • Apply crash analysis techniques in real-world scenarios
  • Use live symbol tracking and code profiling tools

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Apr 23, 2026
Length: 176 pages
Edition : 1st
Language : English
ISBN-13 : 9781806673100
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Product feature icon AI Assistant (beta) to help accelerate your learning
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Apr 23, 2026
Length: 176 pages
Edition : 1st
Language : English
ISBN-13 : 9781806673100
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Table of Contents

8 Chapters
Chapter 1: A Brief History of Embedded Systems Debugging Chevron down icon Chevron up icon
Chapter 2: What Is Debugging and Why Should You Care? Chevron down icon Chevron up icon
Chapter 3: Basic Debugging Features Chevron down icon Chevron up icon
Chapter 4: Advanced Debugging Features Chevron down icon Chevron up icon
Chapter 5: From Theory to Practice Chevron down icon Chevron up icon
Chapter 6: Unlock Your Exclusive Benefits Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Rating distribution
Full star icon Full star icon Full star icon Empty star icon Empty star icon 3
(2 Ratings)
5 star 50%
4 star 0%
3 star 0%
2 star 0%
1 star 50%
N/A Jun 16, 2026
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Feefo Verified review Feefo
N/A Jun 26, 2026
Full star icon Empty star icon Empty star icon Empty star icon Empty star icon 1
Very shallow with too much theory and very little practical examples. Most of the practical example rely on propreitry tools which has a decent learning curve. With open source arm cross compliers and gdb tool and simple coding examples, a lot of insights to debugging could have given but had very Little mention in the book.
Feefo Verified review Feefo
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.

Modal Close icon
Modal Close icon