Another very useful feature is the ability to debug between the hardware and software domains. To build use the command below
cd Vitis_Cross_Probing/scripts
make build_sw LAB=2
This will create a gpio_test application for the cortexa53_0. The application has a while loop, that will just wait on data on the AXI GPIO
int main(void)
{
int Status;
//volatile int Delay;
/* Initialize the GPIO driver */
#ifndef SDT
Status = XGpio_Initialize(&Gpio, GPIO_EXAMPLE_DEVICE_ID);
#else
Status = XGpio_Initialize(&Gpio, XGPIO_AXI_BASEADDRESS);
#endif
if (Status != XST_SUCCESS) {
xil_printf("Gpio Initialization Failed\r\n");
return XST_FAILURE;
}
/* Set the direction for all signals as input */
XGpio_SetDataDirection(&Gpio, 1, 0xFFFFFFFF);
Xil_DCacheDisable();
while (1) {
XGpio_DiscreteRead(&Gpio, 1);
}
}
Open the lab2 workspace in Vitis, and follow the steps below
Highlight the gpio_test, and under FLOW, select Debug and Open Settings. Then select New Launch Configuration
Select the Enable Cross Triggering as shown below
Select Cross Triggering Breakpoints, and Add Item and configurate as shown below. For example, here we want to trigger the Cortex a53 #0 when there is a trigger on the ILA
Select the Debug icon to launch the debug
Launch Vivado Hardware Manager, and connect to your target Note: If you are using the prebuilt XSA, then import the ltx file manually.
Add the trigger condition. For example, here I added a trigger on the RDATA as shown below
Return to Vitis, and In the Debug View, highlight the Cortex-A53 #0 and select Continue (play icon). This will loop on the XGpio_DiscreteRead(&Gpio, 1) line.
There is a VIO connected to the GPIO input and output pins. We can use the VIO to for an AXI transaction.
This will cause a breakpoint to occur on the Cortex-A53 #0 as shown below