Application notes: Debug module
Author:
Group members:
Philip Marshall
Rami Zewail
Sean Kozicki
To use the debug module on the Virtex II multimedia board from xilinx set up a new project and choose XMD stub for debug option.
Next in complier options set compiler to use xmd stub, this will allow you to use the software debug module.
To see your code in C instead of assembly, choose no optimization in the compiler options under the optimization tab.
Mark xmd stub for download in applications tab. Right click on Default microblase_0_xmdstub to see the mark for Bram option.
In software settings set stdin and stdout to debug module (default should be RS232).
Now you are ready to compile and download your file. Under tools tab select build library then build all user applications. Finally select generate bite stream, this could take a few minutes.
Select download now to download your program to the board.
Once download is complete select xmd under tools menu. This will open an application. Enter the command mbconnect stub and you will see a message on that window about connect to the stub. Next select software debug in the tools menu. This should bring up a window containing your code.
You can set break points in your code by clicking at the start of a line. A red dot indicates a break point has been set. Click the run button to start your code. The step option takes you to the next instruction and will step through nested function calls. The next button will take you to the next instruction on your main program without stepping into other functions. Continue allows you to run your program until the next breakpoint. Finish allows your program to finish executing. Any output from stdout will be displayed in the xmd window. Use the function xil_printf() to display and messages to stdout.