A debug port is a chip-level diagnostic interface (akin to a
computer port) included in an
integrated circuit to aid
design
A design is a plan or specification for the construction of an object or system or for the implementation of an activity or process or the result of that plan or specification in the form of a prototype, product, or process. The verb ''to design'' ...
,
fabrication
Fabrication may refer to:
* Manufacturing, specifically the crafting of individual parts as a solo product or as part of a larger combined product.
Processes in arts, crafts and manufacturing
*Semiconductor device fabrication, the process used t ...
,
development,
bootstrapping
In general, bootstrapping usually refers to a self-starting process that is supposed to continue or grow without external input.
Etymology
Tall boots may have a tab, loop or handle at the top known as a bootstrap, allowing one to use fingers ...
,
configuration
Configuration or configurations may refer to:
Computing
* Computer configuration or system configuration
* Configuration file, a software file used to configure the initial settings for a computer program
* Configurator, also known as choice boar ...
,
debugging
In computer programming and software development, debugging is the process of finding and resolving ''bugs'' (defects or problems that prevent correct operation) within computer programs, software, or systems.
Debugging tactics can involve in ...
, and
post-sale in-system programming. In general terms, a debug port is not necessary for end-use function and is often hidden or disabled in finished products.
When constituted in a
high availability
High availability (HA) is a characteristic of a system which aims to ensure an agreed level of operational performance, usually uptime, for a higher than normal period.
Modernization has resulted in an increased reliance on these systems. F ...
or
safety critical
A safety-critical system (SCS) or life-critical system is a system whose failure or malfunction may result in one (or more) of the following outcomes:
* death or serious injury to people
* loss or severe damage to equipment/property
* environme ...
system, a debug port may continue to operate as a
system monitor
A system monitor is a hardware or software component used to monitor system resources and performance in a computer system.
Among the management issues regarding use of system monitoring tools are resource usage and privacy.
Overview
Software ...
for integrity validation in the finished product. In low-cost or high-volume electronics, debug ports are sometimes left enabled to avoid costs of design changes, and can be used by
modders and hackers to gain control of the device and/or access to extra functionality.
Due to their high complexity, debug ports are nearly universal in
microprocessor
A microprocessor is a computer processor where the data processing logic and control is included on a single integrated circuit, or a small number of integrated circuits. The microprocessor contains the arithmetic, logic, and control circu ...
s (CPUs) and
microcontroller
A microcontroller (MCU for ''microcontroller unit'', often also MC, UC, or μC) is a small computer on a single VLSI integrated circuit (IC) chip. A microcontroller contains one or more CPUs ( processor cores) along with memory and programma ...
s (MCUs). These are discussed below.
Hardware debug ports
* Ubiquitous
JTAG
JTAG (named after the Joint Test Action Group which codified it) is an industry standard for verifying designs and testing printed circuit boards after manufacture.
JTAG implements standards for on-chip instrumentation in electronic design autom ...
ports on
ICs
*
Low Pin Count
The Low Pin Count (LPC) bus is a computer bus used on IBM-compatible personal computers to connect low-bandwidth devices to the CPU, such as the BIOS ROM (BIOS ROM was moved to the Serial Peripheral Interface (SPI) bus in 2006), "legacy" I/O ...
debug port on the original
Xbox
Xbox is a video gaming brand created and owned by Microsoft. The brand consists of five video game consoles, as well as applications (games), streaming services, an online service by the name of Xbox network, and the development arm by th ...
, used by modders
*
Serial Wire Debug (SWD), ubiquitous on Arm
Cortex-M microcontrollers
*
Background Debug Mode interface
Background debug mode (BDM) interface is an electronic interface that allows debugging of embedded systems. Specifically, it provides in-circuit debugging functionality in microcontrollers. It requires a single wire and specialized electronics ...
(BDM)
*
Program and Debug Interface
*
Nexus debug
Debug ports on microprocessors
Microprocessors are exceptionally complex devices which commonly contain more than a billion transistors internally and sometimes exceed more than one trillion.
Debug ports on microcontrollers
Microcontrollers are generally smaller than mainstream CPUs, but have now evolved so far into
system on a chip
A system on a chip or system-on-chip (SoC ; pl. ''SoCs'' ) is an integrated circuit that integrates most or all components of a computer or other electronic system. These components almost always include a central processing unit (CPU), memor ...
(SoC) territory, that an MCU can be nearly the only complex chip remaining on an end-use application board (with additional chips devoted to specialized electrical functions such as
level shifting and enhanced
ESD protection).
SoC MCUs usually internal
flash memory
Flash memory is an electronic non-volatile computer memory storage medium that can be electrically erased and reprogrammed. The two main types of flash memory, NOR flash and NAND flash, are named for the NOR and NAND logic gates. Both u ...
as a program store and may also contain internal
EEPROM
EEPROM (also called E2PROM) stands for electrically erasable programmable read-only memory and is a type of non-volatile memory used in computers, usually integrated in microcontrollers such as smart cards and remote keyless systems, or as ...
-based configuration fuses whose correct configuration is essential to the MCU powering up in the correct operating mode; the debug port may be the ''only'' way to initially configure the
clock tree or to load the first software program post-manufacture.
USB Device Firmware Upgrade
Since around 2010, a broad class of MCUs now have integrated
USB peripherals with device firmware upgrade (DFU) in factory ROM.
This class of MCUs appeals to hobbyists who do not wish to invest in the hardware tools needed to access specialized debug ports such as
JTAG
JTAG (named after the Joint Test Action Group which codified it) is an industry standard for verifying designs and testing printed circuit boards after manufacture.
JTAG implements standards for on-chip instrumentation in electronic design autom ...
.
These devices are designed to be resistant to being
bricked
A brick (or bricked device) is a mobile device, game console, router or other consumer electronic device that is no longer functional due to corrupted firmware, a hardware problem, or other damage. The term analogizes the device to a brick's ...
. A bad firmware load is easily recovered by holding a special pin in the active state, which caused the chip to boot up using its internal factory
ROM, which makes a programming interface available through its build-in USB controller. DFU can be viewed as a form of debug port implemented in software rather than hardware. However, this largely defeats the debug functionality of a dedicated hardware debug port, as it is inherently fragile to debug software which also implements your debug interface—but only when functioning correctly.
See also
*
electronic design automation
Electronic design automation (EDA), also referred to as electronic computer-aided design (ECAD), is a category of software tools for designing electronic systems such as integrated circuits and printed circuit boards. The tools work together ...
*
in-target probe
*
in-circuit emulation
*
in-system programming
*
board support package
In embedded systems, a board support package (BSP) is the layer of software containing hardware-specific boot firmware and device drivers and other routines that allow a given embedded operating system, for example a real-time operating system ...
*
microprocessor
A microprocessor is a computer processor where the data processing logic and control is included on a single integrated circuit, or a small number of integrated circuits. The microprocessor contains the arithmetic, logic, and control circu ...
*
microcontroller
A microcontroller (MCU for ''microcontroller unit'', often also MC, UC, or μC) is a small computer on a single VLSI integrated circuit (IC) chip. A microcontroller contains one or more CPUs ( processor cores) along with memory and programma ...
*
system on a chip
A system on a chip or system-on-chip (SoC ; pl. ''SoCs'' ) is an integrated circuit that integrates most or all components of a computer or other electronic system. These components almost always include a central processing unit (CPU), memor ...
References
{{reflist
Hardware testing