In-circuit emulator |
An in-circuit emulator (ICE) is a hardware device used to debug the Software of an embedded system. Embedded systems present special problems for a programmer, because they usually lack keyboards, screens, disk-drives and other helpful user interfaces and storage devices that are present on business computers.
The basic idea of an in-circuit emulator is that it provides a window into the embedded system. The programmer uses the emulator to load programs into the embedded system, run them, step through them slowly, and see and change the data used by the system s software.
An emulator gets its name because it often emulates the central processing unit of the embedded system s computer. Often, it literally has a plug that plugs into the same socket as the CPU integrated circuit. Emulating the main computer lets it do anything that the main computer can do, but under the control of a programmer.
ICE s are always tools that attach a terminal or IBM PC clone to the embedded system. The terminal or PC provides an interactive user interface for the programmer to investigate and control the embedded system.
Notably, when their program fails, most embedded systems simply become inert lumps of nonfunctioning electronics. Without an ICE, the development of embedded systems can be extremely difficult, because there is usually no way to tell what went wrong. With an ICE, the programmer can usually test pieces of code, then isolate the fault to a particular failing piece of code, and then inspect the failing code and rewrite it to solve the problem.
Virtually all embedded systems have a hardware element and a software element, which are separate but tightly interdependent. The ICE allows the software element to be run and tested on the actual hardware on which it is to run, but still allows programmer conveniences to help isolate faulty code, such as source-level debugging (which shows the program the way the programmer wrote it) and single-stepping (which lets the programmer run the program step-by-step to find errors).
Most ICEs consist of an adaptor unit that sits between the ICE host computer and the system to be tested. A header and cable assembly connects the adaptor to a socket where the actual Central processing unit or microcontroller mounts within the embedded system. Recent ICEs enable a programmer to access the On-chip debug circuit which is integrated into CPU via JTAG in order to debug the software of an embedded systems.
The ICE emulates the CPU. From the system s point of view, it has a real processor fitted. From the programmer s point of view, the system under test is under full control, allowing the developer to load, debug and test code directly.
Most host systems are ordinary commercial computers unrelated to the CPU used for development - for example, a Microsoft Windows personal computer might be used to develop software for a system using a Freescale 68HC11 chip, which itself could not run Windows.
The programmer usually edits and compiles the embedded system s code on the host system, as well. The host system will have special compilers that produce executable code for the embedded system. These are called cross compilers or cross assemblers.|
|