Highlight your application under Vitis Components, click the open settings icon for either Debug or Run under FLOW, and select New Launch Configuration.
In Target Setup tab, fill the Hardware Platform field with the one exported by the Vivado™ Design Suite, and click the Debug button.
The Debug View opens.
Note
You can also quickly switch to the Debug View using the Debug icon on the left hand side of the Vitis IDE.
Note
The addresses shown on this page might differ slightly from the addresses shown on your system.
The processor is currently sitting at the beginning of
main()
. You can confirm this information in the Disassembly view, which shows the assembly-level program execution also suspended at the same address.Note
If the Disassembly view is not visible, select View → Disassembly view.
The helloworld.c window also shows execution suspended at the first executable line of C code.
Note
If the Registers view is not visible, select View → Register Inspector or Select Register Inspector from the icon on the right side of the IDE.
Double-click in the margin of the helloworld.c window next to the line of code that reads
init_platform()
andprint()
. This sets the breakpoints atinit_platform()
andprint()
. To confirm the breakpoints, review the Breakpoints view.Select Run → Step Into to step into the
init_platform()
routine.The program executes one step. The call stack is now two levels deep.
Select Run → Resume to continue running the program to the breakpoint.
Program execution stops at the line of code that includes the print command.
Note
The execution address in your debugging window might differ if you modify the “Hello World” source code in any way.
Select Run → Resume to run the program to conclusion.
When the program completes, the Terminal view shows the Hello World print and the Debug view shows that the program is suspended in a routine called
exit()
. This happens when you are running under control of the debugger.Rerun your code several times. Experiment with single-stepping, examining memory, breakpoints, modifying code, and adding print statements. Try adding and moving views.
Click the Stop button on the tool bar to disconnect to the board, or exit the Vitis software platform directly.
This chapter introduced standalone software building and debugging. In the next chapter, you can start working on Linux applications for Zynq 7000 SoCs.