This page gives an overview of AXI-Gpio driver which is available as part of the Xilinx Vivado and SDK distribution.
The source code for the driver is included with the Vitis Unified Software Platform installation, as well as being available in the Xilinx Github repository.
Driver name | path in vitis | Path in GitHub |
---|---|---|
gpio | <Vitis Install Directory>/data/embedded/XilinxProcessorIPLib/drivers/gpio | https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/gpio |
Note: To view the sources for a particular release, use the rel-version tag in github. For example, for the 2020.1 release, the proper version of the code is: https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/gpio |
The driver source code is organized into different folders. The table below shows the gpio driver source organization.
Directory | Description |
---|---|
src | Driver source files, make and cmakelists file |
examples | Example applications that show how to use the driver features |
doc | Provides the API and data structure details |
data | Driver .tcl, .yaml and .mdd file |
Note: AMD Xilinx embeddedsw build flow has been changed from 2023.2 release to adapt to the new system device tree based flow. For further information, refer to the wiki link Porting embeddedsw components to system device tree (SDT) based flow
The .yaml(in data folder) and CMakeLists.txt(in src folder) files are needed for the System Device Tree based flow. The Driver .tcl and .mdd files are for the older build flow which will be deprecated in future.
For a full list of features supported by this IP, please refer AXI_GPIO_Doc
Examples Path:
https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/gpio/examples
Test Name | Example source | Description |
---|---|---|
xgpio_example.c | This example provides the usage of blinking leds on hardware. | |
xgpio_intr_tapp_example.c | This example shows the usage of the driver in interrupt mode. It uses the interrupt capability of the GPIO to detect button events and set the output LED based on the input. | |
xgpio_low_level_example.c | This example provides the usage of low level operations. | |
xgpio_tapp_example.c | This example provides the usage of API's for reading/writing to the individual pins.. |
We can observed output on hardware board
ex: blinking leds in polled and interrupt mode
https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2023.2/doc/ChangeLog#L30
https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2023.1/doc/ChangeLog#L2102
None
None
None
https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2021.1/doc/ChangeLog#L430
https://github.com/Xilinx/embeddedsw/blob/release-2020.2/doc/ChangeLog#L204
https://github.com/Xilinx/embeddedsw/blob/release-2020.1/doc/ChangeLog#L44
https://github.com/Xilinx/embeddedsw/blob/release-2019.2/doc/ChangeLog#L28
https://github.com/Xilinx/embeddedsw/blob/release-2019.1/doc/ChangeLog#L371
None