To evaluate this flow, I have used the AXI GPIO in the Programmable Logic with the interrupt enabled, and connected to the PS IRQ:
Generate the Output Products, Create HDL wrapper, Generate Bitstream and Export to SDK to create the HDF
Here, I used Petalinux 2017.4 to create the Image with the steps below:
/include/ "system-conf.dtsi" / { chosen { bootargs = "earlycon clk_ignore_unused uio_pdrv_genirq.of_id=generic-uio"; stdout-path = "serial0:115200n8"; }; }; &axi_gpio_0 { compatible = "generic-uio"; }; |
Place the BOOT.BIN and the image.ub onto the SD card and boot the kernel.
To test, make sure that the UIO is probed:
You should see that the uio0 is listed here.
Make sure that the IRQ is registered:
You should see this registered as below:
To generate an interrupt, we can write to the ISR in the AXI GPIO. Below is a snippet of the register space
from the AXI GPIO product guide
For example, we can use the devmem utility to write to this register from the linux console:
Then rerun, the cat /proc/interrupts and the interrupt count should be incremented for the gpio:
If users would like to debug a Linux application in SDK, then they can follow on from here with the wiki article here