Xilinx / Xilinx/embeddedsw

CRL_APB_RST_LPD_TOP redefinition warning

Open Beginner friendly
#385 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.2k
Forks
1.1k
PR merge metrics
No merged PRs in 30d

Description

From what I can tell, this warning is generated because xfsbl_hw.h is being injected into psu_init.h by CMake.

https://github.com/Xilinx/embeddedsw/blob/97f2baf7f69e9d5f447650110af0d8841e501277/lib/sw_apps/zynqmp_fsbl/src/CMakeLists.txt#L29

CRL_APB_RST_LPD_TOP is defined in my HW designs generated psu_init.c and also in xfsbl_hw.h. The included board files under misc also define CRL_APB_RST_LPD_TOP and would have the same warning generated if used, so I suspect this isn't a problem with my particular HW design files.

https://github.com/Xilinx/embeddedsw/blob/97f2baf7f69e9d5f447650110af0d8841e501277/lib/sw_apps/zynqmp_fsbl/misc/zcu102/psu_init.c#L22379

https://github.com/Xilinx/embeddedsw/blob/97f2baf7f69e9d5f447650110af0d8841e501277/lib/sw_apps/zynqmp_fsbl/src/xfsbl_hw.h#L264

I removed the xfsbl_hw.h injection from CMakeLists.txt and was able to compile successfully without any errors or warnings. I'm not sure what the intended purpose of injecting that header is, maybe there are cases where it is needed, but it seems to only cause problems for me and doesn't appear to be needed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with lib/sw_apps/zynqmp_fsbl/src/CMakeLists.txt at line 29 and inspect how xfsbl_hw.h is injected into psu_init.h. Compare the definitions in src/xfsbl_hw.h and the generated or sample misc/*/psu_init.c files, then build the ZynqMP FSBL to confirm the redefinition warning is resolved without introducing other errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, cmake
Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.