Skip to content

zephyr: stm32n6 support #2348

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
merged 3 commits into from
Jun 25, 2025
Merged

zephyr: stm32n6 support #2348

merged 3 commits into from
Jun 25, 2025

Conversation

erwango
Copy link
Contributor

@erwango erwango commented Jun 20, 2025

Cherry-pick of #2323 adding STM32N6 support with XIP and RAMLOAD support

@erwango erwango changed the title N6 mcuboot stm32n6 support Jun 20, 2025
@erwango erwango changed the title stm32n6 support zephyr: stm32n6 support Jun 20, 2025
@erwango
Copy link
Contributor Author

erwango commented Jun 23, 2025

@nordicjm PTAL

@nordicjm
Copy link
Collaborator

rebase on main to fix python error

With CONFIG_STM32_MEMMAP flag get NOR flash 32 bytes header
Read the NOR flash to get header of the image.
The FLASH_DEVICE is now the external NOR defined by
the board device tree to be the first qspi/ospi/xspi instance
(not necessarily zephyr, flash-controller)

Signed-off-by: Francois Ramu <francois.ramu@st.com>
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
@erwango
Copy link
Contributor Author

erwango commented Jun 23, 2025

Hold-On, I'll push a different approach of the mcuboot target.

erwango added 2 commits June 23, 2025 15:36
Add mcuboot configuration for stm32n6570_dk.
Run in L&R mode and launch application in DIRECT XIP.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
On STM32N6, MCUBoot is loaded by the BootROM to axisram2 and,
when running in RAMLOAD configuration, application image is loaded
in axisram1.
To support this, define MULTIPLE_EXECUTABLE_RAM_REGIONS and implement
boot_get_image_exec_ram_info() which provides the right executable
address and size based on axisram1 node definition.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
@erwango
Copy link
Contributor Author

erwango commented Jun 23, 2025

Updated following new variant addition in zephyrproject-rtos/zephyr#91941

Comment on lines +137 to +139
#ifdef CONFIG_SOC_SERIES_STM32N6X
#define MULTIPLE_EXECUTABLE_RAM_REGIONS
#endif
Copy link
Collaborator

Choose a reason for hiding this comment

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

I do not think we should have SOC specific Kconfigs here. We rather should add some Kconfig to manipulate MULTIPLE_EXECUTABLE_RAM_REGIONS directly and then have it selected in soc/board prj.conf.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@de-nordic So, where this new Kconfig should be defined, zephyr ?

Copy link
Collaborator

@de-nordic de-nordic left a comment

Choose a reason for hiding this comment

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

Generally looks OK, comment https://github.com/mcu-tools/mcuboot/pull/2348/files#r2166224346 is assumed to be addressed later.

@de-nordic de-nordic merged commit adbe1cf into mcu-tools:main Jun 25, 2025
58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants