Skip to content

Fix xtensa project build issue #88305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ZhaoxiangJin
Copy link
Contributor

This PR fix #82635 CI build issue.

  • The fsl_common_dsp driver needs to be loaded when building xtensa projects and the fsl_common_arm driver needs to be loaded when building arm projects.
  • Add a condition to load power driver, the power driver is not needed to build RT700 hifi core project.

@ZhaoxiangJin ZhaoxiangJin changed the title modules: hal_nxp: Load SDK common drver per architecture Fix xtensa project build issue Apr 9, 2025
@ZhaoxiangJin ZhaoxiangJin marked this pull request as ready for review April 9, 2025 01:09
@zejiang0jason
Copy link
Contributor

Hi @hakehuang , please help to test build RT700 HIFI1 and HIFI4 with this PR, thanks.

@hakehuang
Copy link
Collaborator

hakehuang commented Apr 9, 2025

Hi @hakehuang , please help to test build RT700 HIFI1 and HIFI4 with this PR, thanks.

build is PASS for both platforms. @ZhaoxiangJin , @zejiang0jason

iuliana-prodan
iuliana-prodan previously approved these changes Apr 9, 2025
@@ -39,7 +39,11 @@ endif()
set(CONFIG_MCUX_COMPONENT_device.system ON)
set(CONFIG_MCUX_COMPONENT_device.CMSIS ON)
set(CONFIG_MCUX_COMPONENT_driver.clock ON)
set(CONFIG_MCUX_COMPONENT_driver.power ON)

if((NOT CONFIG_SOC_MIMXRT798S_HIFI1) AND (NOT CONFIG_SOC_MIMXRT798S_HIFI4))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this only an issue on RT700 HIFI core?
Do we need to use the below instead?
if(CONFIG_ARCH STREQUAL "xtensa")

Copy link
Contributor Author

@ZhaoxiangJin ZhaoxiangJin Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @mmahadevan108, for other xtensa platform:

  1. The problem with RT700 is that the kconfig option HAS_MCUX is selected by SOC_MIMXRT798S_HIFI4/SOC_MIMXRT798S_HIFI1. At this time, the fsl_power.c/.h file will be loaded, which uses some ARM architecture-related registers and instructions. Then the build process will be broken.
  2. RT500 Fusion has no such problem, because SOC_MIMXRT595S_F1 does not select the kconfig option HAS_MCUX, so fsl_power.c/.h will not load.
  3. imx8xx dsp project has no fsl_power.c/.h

Therefore, the current conditions are sufficient.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ZhaoxiangJin thank you for your response.
@iuliana-prodan, do we need HAS_MCUX selected? This is not selected for RT595, hence checking.

  - The fsl_common_dsp driver needs to be loaded
    when building xtensa projects and the fsl_common_arm
    driver needs to be loaded when building arm projects.

  - Add a condition to load power driver, because the power
    driver is needed to build RT700 arm core project, but it
    is not needed to build hifi core project.

Signed-off-by: Zhaoxiang Jin <[email protected]>
@ZhaoxiangJin
Copy link
Contributor Author

fixed merge conflict.

@ZhaoxiangJin
Copy link
Contributor Author

Hello @mmahadevan108, seems some other PRs are blocked by this PR, can we approve this PR first?

@kartben kartben merged commit e4a9467 into zephyrproject-rtos:main Apr 21, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants