Difference between revisions of "Code Composer Studio v5"
From IGEP - ISEE Wiki
Line 37: | Line 37: | ||
</pre> | </pre> | ||
− | [[Category:Software]] | + | [[Category:Software applications]] |
Latest revision as of 10:45, 25 November 2011
Using JTAG to debug x-loader on a linux host
1. File > New > Project > C/C++ > Makefile Project with Existing Code, and I gave it the xloader source directory. This was then built with your infinite-loop, and requisite debug symbols.
2. File > New > Target Configuration File, and then specified the JTAG emulator, and target board.
3. This Target Configuration was pointed at the xloader ELF executable. One way of doing so is as follows:
Run > Debug Configurations > xloader.ccxml > Program > Device > Cortex_A8_0 > Project > x-load-1.41
where xloader.ccxml was my target cfg, Cortex_A8_0 is my board, and x-loader/ is the src code directory.
Run > Debug Configurations > xloader.ccxml > Program > Device > Cortex_A8_0 > Program > x-load
is how the xloader executable was picked up. However, the dialogue box does not list all the files in the directory, even if you choose to display All Files! This is a minor bug; I simply typed the file name into the Location text-box.
4. xloader was appropriately written to the flash card;
5. The JTAG pod was connected to a USB port on the host, and the target board was booted from the flash card. It came up, and looped in the xloader src code. I'd put the loop deep inside the C code;
6. I started ccsv5, and did a Launch Selected Configuration on my xloader141.ccxml. Within moments, it connected, and halted at the infinite loop, showing the source code and all the variables, etc. Then I stepped through the code. (Right-click on the line after the loop, and select Move to Line, or some such thing, thereby skipping the loop.)
diff --git a/lib/board.c b/lib/board.c index 1947e5a..a495620 100644 --- a/lib/board.c +++ b/lib/board.c @@ -92,6 +92,8 @@ void start_armboot (void) misc_init_r(); + volatile int i=0; while (i==0); + buf = (uchar*) CFG_LOADADDR; *(int *)buf = 0xffffffff;