Sample C code (included in the download) that has been tested with Microsoft C++ …

Declare any #includes, global variables that will be useful in your testing.

cbt1


cbt2


In order to run the test outside the Eclipse environment, you will need a “runner” in a “main” as shown here:

cbt3


It is a good idea to test the JTAG scan chain before going any further. This is shown in the code below. It starts with setting up the hardware connection, i.e.: how the PC is attached to the target under test.

ScanChainAnalysis


Now do the connection to the hardware …

connectToTarget


Do any board initialization necessary …

setUpTarget


Test the RAM …

ramTest


Download an application onto the board. Single step, then run it after setting hardware and software breakpoints. Examine memory and registers and compare against expected values.

RunProgram