Debugging System Using In-Circuit Emulator Polling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Embedded devices lack universal asynchronous receivers/transmitters, leading to inefficient debugging due to program interruptions when using semihosting mechanisms, which increases development costs and reduces debugging efficiency.
Innovation Solution
A debugging system that uses an in-circuit emulator connected to an embedded device via a terminal computer, employing polling to read and delete real-time debugging information from a buffer within the embedded device, allowing continuous program operation without additional hardware interfaces.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If semihosting mechanism is used to transmit debugging information, then universal asynchronous receiver/transmitter is not needed, but program operations are interrupted reducing debugging efficiency
Solution Approach 1:
The patent segments the debugging information transmission process by creating a dedicated buffer memory area separate from the main program execution flow. The buffer stores debugging information independently, allowing the program to continue executing while debugging data is accumulated and transmitted separately through the semihosting mechanism, thus eliminating the interruption problem.
Solution Approach 2:
The patent introduces a buffer memory as an intermediary between the program execution and the debugging information transmission. This buffer acts as a mediator that decouples the program flow from the debugging output process, allowing continuous program execution while debugging information is transmitted asynchronously through the semihosting mechanism.
2Productivity
If universal asynchronous receiver/transmitter is used to transmit debugging information, then debugging efficiency is improved, but development cost increases
Solution Approach 1:
The patent makes the existing semihosting mechanism multi-functional by combining it with a dedicated buffer memory structure. This allows the low-cost semihosting mechanism to achieve continuous debugging information transmission without interruptions, effectively providing the benefits previously only available from more expensive hardware solutions like universal asynchronous receivers/transmitters.
Solution Approach 2:
The patent creates a virtual communication channel by implementing a buffer structure that mimics the functionality of a universal asynchronous receiver/transmitter. This software-based buffer copying mechanism replicates the continuous transmission capability of expensive hardware solutions, providing similar debugging efficiency without the additional hardware cost.
3Productivity
If debugging information is transmitted continuously, then debugging efficiency is improved, but buffer memory is quickly filled requiring frequent clearing
Solution Approach 1:
The patent implements a feedback mechanism where the terminal computer monitors the buffer status and dynamically adjusts the reading frequency. When the buffer contains debugging information, the terminal computer reads and clears it; when the buffer is empty or being written to, the terminal computer waits. This feedback-based approach ensures continuous debugging information transmission while preventing buffer overflow and minimizing unnecessary buffer management operations.
Data Source
AI summary
A debugging system includes an embedded device and a terminal computer. The embedded device includes a memory unit, and the memory unit includes a first buffer, the embedded device is configured for executing at least one instruction to generate at least one real-time debugging information, and writing the real-time debugging information into the first buffer. The terminal computer is connected to an in-circuit emulator (ICE) via a first interface, and the ICE is connected to the embedded device via a second interface. The terminal computer uses polling to read the real-time debugging information stored in the first buffer via the ICE, and deletes the real-time debugging information stored in the first buffer afterwards.


