Skip to content

NXP: add SPSDK as runner and support i.MX95 firmware build and flashing #80507

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

yangbolu1991
Copy link
Member

@yangbolu1991 yangbolu1991 commented Oct 28, 2024

This PR is to make it easier to build and flash NXP i.MX platforms having firmware images dependency with NXP SPSDK (https://spsdk.readthedocs.io).
For i.MX95, an bootable image depends on many firmware images besides m7 zephyr.bin, like ddr firmware, system manager image, oei images, ahab container image and so on.

This PR is to support west build to generate a bootable flash.bin.
And west flash to program flash.bin to SD boot device through USB.

Thanks.

@yangbolu1991 yangbolu1991 force-pushed the develop/add-runner-spsdk branch from 751e430 to 9d13b00 Compare October 30, 2024 10:07
@yangbolu1991
Copy link
Member Author

Updated to v2. Changes include,

  • Dropped images copy.
  • Dropped yml file and generated during build instead.
  • Improved Kconfig.
  • Added doc.
  • Fixed CI issues.

Thank you very much @hakehuang and @nordicjm

@nordicjm
Copy link
Contributor

west command CI is failing

$ west flash

# program to emmc card
$ west flash --bootdevice=emmc
Copy link
Contributor

@hakehuang hakehuang Oct 30, 2024

Choose a reason for hiding this comment

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

Suggested change
$ west flash --bootdevice=emmc
$ west flash --bootdevice=emmc
Need switch the board to SD/MMC mode, SW7 1010, and power cycle board to boot with it.

hakehuang
hakehuang previously approved these changes Oct 30, 2024
@yangbolu1991
Copy link
Member Author

west command CI is failing

Will resolve that. Thanks.

@yangbolu1991
Copy link
Member Author

Updated to v3. Changes include,

  • Improved cmake file per @nordicjm suggestion.
  • Improved doc per @hakehuang suggestion.
  • Fixed CI west command issues.

Thank you very much.

@yangbolu1991 yangbolu1991 requested a review from nordicjm October 31, 2024 07:56
@JiafeiPan
Copy link
Contributor

Rebased this PR to trigger twister testing.

nordicjm
nordicjm previously approved these changes Jun 4, 2025
@dleach02
Copy link
Member

dleach02 commented Jun 4, 2025

I will start sequencing the HAL side merge as soon as CI is clean of the RUST failure.

@JiafeiPan JiafeiPan added this to the v4.2.0 milestone Jun 9, 2025
@mmahadevan108 mmahadevan108 dismissed stale reviews from nordicjm and JiafeiPan via 9248f35 June 9, 2025 15:27
@mmahadevan108 mmahadevan108 force-pushed the develop/add-runner-spsdk branch from 7814cec to 9248f35 Compare June 9, 2025 15:27
mmahadevan108
mmahadevan108 previously approved these changes Jun 9, 2025
JiafeiPan
JiafeiPan previously approved these changes Jun 10, 2025
Updated hal_nxp to support imx95 blobs.

Signed-off-by: Yangbo Lu <[email protected]>
Secure Provisioning SDK (SPSDK) is a unified, reliable,
and easy to use Python SDK library working across the
NXP MCU portfolio providing a strong foundation from
quick customer prototyping up to production deployment.

Docs: https://spsdk.readthedocs.io

Signed-off-by: Yangbo Lu <[email protected]>
Signed-off-by: Jiafei Pan <[email protected]>
Added nxp spsdk as west runner.

Secure Provisioning SDK (SPSDK) is a unified, reliable,
and easy to use Python SDK library working across the
NXP MCU portfolio providing a strong foundation from
quick customer prototyping up to production deployment.

Docs: https://spsdk.readthedocs.io

Signed-off-by: Yangbo Lu <[email protected]>
Signed-off-by: Jiafei Pan <[email protected]>
Added spsdk flasher support.

Signed-off-by: Yangbo Lu <[email protected]>
Supported NXP Secure Provisioning SDK (SPSDK) generating
and flashing bootable firmware for imx95_evk_mimx9596_m7/a55.

Signed-off-by: Yangbo Lu <[email protected]>
Signed-off-by: Jiafei Pan <[email protected]>
@yangbolu1991 yangbolu1991 force-pushed the develop/add-runner-spsdk branch from 9248f35 to 23d4d2b Compare June 10, 2025 02:30
@yangbolu1991 yangbolu1991 dismissed stale reviews from mmahadevan108 and JiafeiPan via 6684dcb June 10, 2025 02:32
@yangbolu1991 yangbolu1991 force-pushed the develop/add-runner-spsdk branch from 23d4d2b to 6684dcb Compare June 10, 2025 02:32
@yangbolu1991
Copy link
Member Author

Rebased to address west.yml conflict.
Thanks.

@hakehuang
Copy link
Contributor

Rebased to address west.yml conflict. Thanks.

@yangbolu1991 M7 seems not working, please check. I test with hello_world, it does not starts well. but A core is OK.

Copy link

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@dleach02
Copy link
Member

@carlescufi your change request should be completed. Can you confirm?

Copy link
Member

@carlescufi carlescufi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@mmahadevan108 mmahadevan108 removed the DNM (manifest) This PR should not be merged (controlled by action-manifest) label Jun 11, 2025
@dkalowsk dkalowsk merged commit eb8cabb into zephyrproject-rtos:main Jun 11, 2025
50 of 52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants