How to add conditions under “examples” section of a library YAML:
examples:
xilpuf_enc_dec_data_example.c:
xilpuf_example.c:
- dependency_files:
- xilpuf_example.h
xilpuf_enc_dec_data_client_example.c:
xilpuf_client_example.c:
- dependency_files:
- xilpuf_example.h
xilpuf_versal_net_example.c:
- dependency_files:
- xilpuf_versal_net_example.h
xilpuf_spartan_ultrascale_plus_example.c:
- dependency_files:
- xilpuf_spartan_ultrascale_plus_example.h
xilpuf_ssit_client_example.c:
- dependency_files:
- xilpuf_example.h
condition : |
examples = []
if platform in ["Versal", "VersalNet", "Versal_2VE_2VM"]:
if proc in ["microblaze", "psv_cortexa72", "psv_cortexr5", "psx_cortexa78", "psx_cortexr52", "cortexa78", "cortexr52"]:
examples += ["xilpuf_enc_dec_data_example.c", "xilpuf_example.c", "xilpuf_client_example.c",
"xilpuf_enc_dec_data_client_example.c"]
if platform in ["VersalNet", "Versal_2VE_2VM"]:
if proc in ["microblaze", "psx_cortexa78", "psx_cortexr52", "cortexa78", "cortexr52"]:
examples += ["xilpuf_versal_net_example.c"]
if platform in ["Versal"]:
if proc in ["microblaze", "psv_cortexa72", "psv_cortexr5"]:
examples += ["xilpuf_ssit_client_example.c"]
if "spartanuplus" in variant:
examples += ["xilpuf_spartan_ultrascale_plus_example.c"]
How the Condition Works:
- xilpuf_enc_dec_data_example.c, xilpuf_example.c, xilpuf_client_example.c, xilpuf_enc_dec_data_client_example.c
- These examples are valid for APU, RPU and Soft MB of all the Versal, Versal Net and Versal 2VE and 2VM devices. These are not supported for PMC, PSM, and ASU processors.
- xilpuf_versal_net_example.c
- This example is valid for Versal Net and Versal 2VE and 2VM devices and are supported for APU, RPU and Soft MBs only.
- xilpuf_ssit_client_example.c
- This example is valid only for Versal devices and are supported for APU, RPU and Soft MBs only.
- xilpuf_spartan_ultrascale_plus_example.c
- This example is supported only for spartanuplus variant of MicroBlaze/MicroBlaze RISCV devices.
Other Examples can be referred from the following links: