Chapter 10: Accessing the Debug Interfaces
Most microcontrollers (MCUs) come with some sort of debugging/programming interface. The standard interface is called JTAG (Joint Test Action Group). It is an industry standard and is usually present in chips with a pin count high enough to support it. Serial Wire Debug (SWD) is a derivative of JTAG for lower-count chips. Some vendors also have their own variants (DebugWIRE for Atmels, Spy-Bi-Wire (serialized JTAG) on TI's MSP430s, PICs ICSP, and others). Now how do we find them, access them, and use them? This is what we will discuss in this chapter.
In this chapter, we will first cover the JTAG protocol and then learn how to find the JTAG pins. We will then learn how to install and use OpenOCD. Toward the end of the chapter, we will also cover some practical use cases.
In this chapter, we will cover the following topics:
- What is JTAG used for?
- The JTAG protocol
- Finding JTAG pins/test points
- ARM JTAG –...