RealView Tools

For board bring-up and testing there is no substitute for a good debugger and ICE unit. We use ARM's RealView Developer Suite and RealView ICE for most bring-up jobs.

HOW DOES AN ICE WORK?80-consulting-ICE-to-board
ICE standards for In Circuit Emulator. Traditionally an ICE worked by connecting to a 'bond-out' version of a CPU, where all address, data and control pins are brought outside the chip. Even today this is possible for little 8-bit micros with limited address space and no on-chip cache.

However, modern embedded CPUs such as the ARM, can support quite high on-chip clock speeds, and internal caches. For a traditional ICE to operate with these, it would need to have access to the high-speed pre-cache lines from the CPU core. This would involve bringing perhaps 90 extra very high-speed pins to the outside of the chip. This limitiation of traditional ICEs makes them basically unaffordable for most applications.

As a result of this problem, many manufactures support a more limited ICE debugging mode, which makes use of just the 5 JTAG pins connected to the core CPU. These pins are required for all chips, for the chip fabrication test process, and reusing them means that ICE debugging adds no more pins to the chip.

A modern ICE therefore sees exactly what the CPU core sees. It can look at memory, change registers, program some flash memory and access I/O regions.  This is precisely why the ICE is so useful for bring-up work. If the memory system is slightly broken, then the ICE will show this up immediately. For example, if bits 0 and 1 are stuck together, then a simple memory test, or even just changing values manually in the memory window, will show the problem.

So to use an ICE, there is no need for the board to actually work. Provided there is a clock and power going to the CPU, it is usually possible to talk to the CPU with the ICE and see what is going on.

Semi-hosting is an extremely useful feature of the ARM RealView tools. It allows you to make use of the full ANSI C library from your target board.
This means that, from your target board, you can open files and read test data from them. Or you can write test logs to a file anywhere on your network. The RealView tools use your host PC to do the actual reading and writing, and the data travels over the ICE connection to your computer.

Semi-hosting uses the normal C library calls such as fopen(), fwrite() and printf(). If you use printf() then the output goes to the console in the debugger so that you can see program output. If you use scanf() then the debugger will ask you for the input, and then send it to the board.

ARM's implementation of semi-hosting makes fast work of many bring-up and test tasks.

Part of testing a board is writing test programs for it. An ICE and debugger are very useful for this, due to the CPU view and the semihosting features. Test programs can be coded in C or even in assembler for particular purposes.

With the RealView tools, test programs can be run automatically from a shell script, allowing automated testing and logging. Scripts can be set up to control the debugger, so that it makes changes to memory, loads, saves and runs programs, and dumps results all without user input. This approach can even be useful in manufacturing environments.