embeddedsw icon indicating copy to clipboard operation
embeddedsw copied to clipboard

SDT Driver Support and Compilation Errors

Open Jieumban opened this issue 6 months ago • 1 comments

  1. SDT Driver Support and Compilation Errors

I'm developing a project on zcu106 using the 2024.2 BSP, and I've noticed that some drivers, e.g. xscugic_g.h, don't seem to fully support SDT (System Device Tree). This is leading to numerous compilation errors when I try to build my project.

In this case. Should I need to add [#ifndef] SDT before every related function​ call?

  1. Duplicate Macro Definitions

When I generate a platform from an .xsa file in Vitis and then generate an xintc example. I'm encountering a confusing situation: certain macros, like XPAR_PSU_AFI_2_BASEADDR, appear to be defined twice. I am curious when only PSU AFI related has the issue.

/* Canonical definitions for peripheral PSU_AFI_3 */
#define XPAR_PSU_AFI_2_BASEADDR 0xfd390000
#define XPAR_PSU_AFI_2_HIGHADDR 0xfd39ffff

/* Definitions for peripheral PSU_AFI_2 */
#define XPAR_PSU_AFI_2_BASEADDR 0xfd380000
#define XPAR_PSU_AFI_2_HIGHADDR 0xfd38ffff

Jieumban avatar Aug 01 '25 01:08 Jieumban

@Jieumban thanks for reporting the issue.

1.>

  1. SDT Driver Support and Compilation Errors

I'm developing a project on zcu106 using the 2024.2 BSP, and I've noticed that some drivers, e.g. xscugic_g.h, don't seem to fully support SDT (System Device Tree). This is leading to numerous compilation errors when I try to build my project.

In this case. Should I need to add [#ifndef] SDT before every related function​ call?

Could you please share the exact errors here i mean which defines are missing? also please share your xsa or sdt folder if possible.

  1. Duplicate Macro Definitions

When I generate a platform from an .xsa file in Vitis and then generate an xintc example. I'm encountering a confusing situation: certain macros, like XPAR_PSU_AFI_2_BASEADDR, appear to be defined twice. I am curious when only PSU AFI related has the issue.

/* Canonical definitions for peripheral PSU_AFI_3 */
#define XPAR_PSU_AFI_2_BASEADDR 0xfd390000
#define XPAR_PSU_AFI_2_HIGHADDR 0xfd39ffff

/* Definitions for peripheral PSU_AFI_2 */
#define XPAR_PSU_AFI_2_BASEADDR 0xfd380000
#define XPAR_PSU_AFI_2_HIGHADDR 0xfd38ffff

This issue was fixed in the latest lopper https://github.com/devicetree-org/lopper/commit/43a8d8d50f49828928ac64e51f5fad6ab020b652 and in 2025.1 tool

kedareswararao avatar Aug 06 '25 07:08 kedareswararao