Before you run the application, set a breakpoint at main():
xsdb% 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 breakpointin the XSCT console.Resume the processor core:
xsdb% con
The following informative messages will be displayed when the core hits the breakpoint.
xsdb% Info: Cortex-R5 #0 (target 7) Stopped at 0x100050 (Breakpoint)main() at testapp_r5.c: 86 86: {
At this point, you can view registers when the core is stopped:
xsdb% rrd
View local variables:
xsdb% locals
Step over a line of the source code and view the stack trace:
xsdb% nxt Info: Cortex-R5 #0 (target 7) Stopped at 0x10005c (Step)89: Status = PsUartSetup(&InterruptController, &UartPs, xsdb% bt
You can use the
helpcommand to find other options:You can use the
help runningcommand to get a list of possible options for running or debugging an application using XSDB.You can now run the code:
xsdb% 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.