Before you run the application, set a breakpoint at main():
xsct% bpadd -addr &main
This command returns the breakpoint ID. You can verify the breakpoints planted using the command
bplist
. For more details on breakpoints in XSCT, typehelp breakpoint
in the XSCT console.Resume the processor core:
xsct% con
The following informative messages will be displayed when the core hits the breakpoint.
xsct% Info: Cortex-R5 \#0 (target 7) Stopped at 0x10021C (Breakpoint)
At this point, you can view registers when the core is stopped:
xsct% rrd
View local variables:
xsct% locals
Step over a line of the source code and view the stack trace:
xsct% nxt Info: Cortex-R5 #0 (target 6) Stopped at 0x100490 (Step) xsct% bt
You can use the
help
command to find other options:You can use the
help running
command to get a list of possible options for running or debugging an application using XSCT.You can now run the code:
xsct% con
At this point, you can see the Cortex-R5F application print a message on the UART-1 terminal.
The next chapter shows how to build and debug Linux applications.