Tip No. 1: Do not skimp on the debug interface
The debug interface allows monitoring of hardware and software as well as their interaction, and is one of the most important possibilities to test a microcontroller system not only as a black box. Therefore, whenever possible a system-on-chip (SoC) with a high-performance diagnosis interface should always be selected and this then implemented on the hardware in the most powerful stage. Also remember that modern debug interfaces, the same as the functional peripherals, are complex assemblies and they therefore require the same level of attention in PCB layout with respect to power supply, clock frequency, etc.
Tip No. 2: Advantages of a trace interface
A trace is always essential whenever the program flow or the change of program data must be completely reconstructed to find the cause of a problem. However, besides that, an additional high-performance interface for code trace and/or data trace is highly recommended. The reason for this is because the results of a trace not only - as is often falsely assumed - serve the sole purpose of troubleshooting, but also provide a solid basis for debugging at system level with functions such as profiling, code coverage and execution sequence diagram. For example, performance bottlenecks in the application can be detected or the software certified according to specific standards. Nowadays, based on a code trace, an appropriate high-performance debug tool can, for example, also generate reliable statistics about C0 and C1 code coverage. C0 evaluates the coverage of each machine instruction and C1 evaluates the coverage of each decision branch in the program flow.
Figure 1: Code Coverage at function level
Figure 2: Universal Access Device 3+ with debug and trace pod at Cortex A8 target
Tip No. 3: Use special emulation devices
For some of the very high-performance 16-bit and 32-bit microcontrollers such as, for example, Infineon's automotive SoCs in the XC2000 and TriCore