Vitis YAML file - 2024.1 English

Vitis Tutorials: Embedded Software (XD260)

Document ID
XD260
Release Date
2024-06-19
Version
2024.1 English

In the Vitis Unified IDE, the driver MDD is replaced by YAML file.

properties:
  compatible:
    OneOf:
      - items:
        - enum:
          - xlnx,xps-gpio-1.00.a
          - xlnx,axi-gpio-2.0

Instead of using the supported_peripherals parameter, it uses the compatible parameter, and cross checks the SDT nodes using the Lopper framework. For example, users can see the SDT snippet below. In this case, the AXI GPIO driver would be populated in the Domain as the compatibility string matches. If matched, the driver is added to the bsp.yaml (a domain specific file)

	amba_pl: amba_pl {
		ranges;
		compatible = "simple-bus";
		#address-cells = <2>;
		#size-cells = <2>;
		firmware-name = "design_1_wrapper.bit.bin";
		axi_gpio_0: axi_gpio@a0000000 {
			xlnx,gpio-board-interface = "led_8bits";
			compatible = "xlnx,axi-gpio-2.0" , "xlnx,xps-gpio-1.00.a";
			xlnx,all-outputs = <1>;
			xlnx,gpio-width = <8>;
      ...

Similarly, each driver has it own initializion file. This is populated using the metadata in the driver YAML file too. This describes the elements that will show up in the driver config structure (XGpio_Config in case below). The driver_name_g.c will be updated based on the required params here.

Note: The order mentioned under the “required” section must be same as that the driver config structure.

config:
    - XGpio_Config

required:
    - compatible
    - reg
    - xlnx,interrupt-present
    - xlnx,is-dual
    - interrupts
    - interrupt-parent
    - xlnx,gpio-width

Note: Users needs to be aware that the DEVICE_ID is no longer populated into the driver config struct. Instead the BASEADDR is used to identify the driver instance. The DEVICE_ID will also not be populated in the xparameters.h file. This means that code developed in Vitis Classic will need to be changed to reflect this. All the example driver code has been updated to reflect this

#ifndef SDT
#define GPIO_EXAMPLE_DEVICE_ID  XPAR_GPIO_0_DEVICE_ID
#else
#define	XGPIO_AXI_BASEADDRESS	XPAR_XGPIO_0_BASEADDR
#endif