Circular Debug Buffers for Real-Time Embedded System Communication

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current debugging methods for embedded systems, such as semihosting and Serial Wire Output (SWO), cause significant delays by halting the target system, disrupting real-time operations and potentially leading to catastrophic failures in time-critical applications.

Innovation Solution

Implementing circular debug buffers that allow terminal output and input to be provided without halting the target system, enabling real-time or near-real-time communication between the target and host systems through a debug probe, which writes and reads messages efficiently without blocking the CPU.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If semihosting or Serial Wire Output (SWO) is used for debugging, then debugging functionality is provided, but significant delays are caused by halting the target system

Engineering Contradiction:
Improvedebugging functionalityVSAvoiddebugging delays
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent segments the debugging communication into two independent circular buffers: an up buffer for target-to-host communication and a down buffer for host-to-target communication. This segmentation allows the target system to write debug messages to the up buffer without halting, while the debug probe reads from the down buffer separately, eliminating the need to halt the target system for debugging operations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces circular buffers as intermediary data structures stored in the target system's memory. These buffers act as mediators between the target CPU and the debug probe, allowing asynchronous communication. The target system writes to the up buffer while the debug probe reads from the down buffer, enabling real-time debugging without halting the target system.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of operation

If the target system is halted for debugging operations, then debugging control is achieved, but real-time operations are disrupted

Engineering Contradiction:
Improvedebugging controlVSAvoidreal-time operations
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent implements dynamic buffering where the circular buffers can be configured with different sizes and the debug probe can control the buffering mode (blocking vs. non-blocking). This allows the system to adapt between different debugging needs while maintaining real-time operation, as the buffers dynamically manage the flow of debug information without requiring system halts.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent enables continuous debugging operation through the circular buffer mechanism. The target system can continuously write debug messages to the up buffer without interruption, and the debug probe continuously reads from the down buffer. This continuous data exchange eliminates the need to halt the target system, maintaining both debugging control and real-time operation simultaneously.

Inventive Principle:
Principle #20Continuity of useful action

3Speed

If circular debug buffers are implemented, then real-time communication is enabled, but device complexity increases

Engineering Contradiction:
Improvecommunication speedVSAvoidbuffer management complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent implements self-service buffer management where the circular buffers automatically handle data exchange between the target and host. The buffers are configured with write and read pointers that automatically advance as data is written and read, eliminating the need for complex manual buffer management. The debug probe can configure the buffers and then operates autonomously, reducing the complexity burden on the target system.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS9384106B2Real time terminal for debugging embedded computing systems
Publication Date: 2016.07.05 SEGGER ROLF
  • US9384106B2 patent drawing
  • US9384106B2 patent drawing
  • US9384106B2 patent drawing

AI summary

One or more circular debug buffers can allow terminal output data to be provided from the target system to a host without halting the target system or causing significant delays. One or more circular debug buffers may also allow input (such as keyboard input) to be provided from the host to the target without halting the target system or causing significant delays. Accordingly, communications between the target and host may be performed in real time or near real time. These communications may be used for debugging purposes or more generally, for any purpose, including purposes unrelated to debugging.