Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support for Second Stage Bootloader (SSBL) for board NUCLEO-N657X0-Q with STM32N657X0 Microcontroller (MCU)
The STM32N6xx series of MCUs does not have internal flash memory, so it relies on external flash. It includes an integrated mechanism that copies up to 255 KB of the First Stage Bootloader (FSBL) from external flash to RAM, starting at address 0x34180400, which corresponds to the AXISRAM2 segment. This functionality is implemented in this PR #38.
To use the AXISRAM2 segment for firmware, we cannot run the FSBL from it, so the software must run from another location. The best solution is an SSBL that runs from external memory. The SSBL allows us to unlock the full potential of the MCU's RAM, providing a total of 4.2 MB of contiguous embedded memory.
This PR introduces a linker script that prepares the firmware to run at XSPI2 addresses starting from 0x70100400 in memory-mapped mode, as well as drivers for the external flash MX25UM51245G, which comes with the board.
The sequence is as follows: the FSBL is placed at address 0x70100400, and the SSBL is placed at 0x70200400.
The SSBL runs from external flash and uses the CACHEAXI address space, which allows the firmware to be programmed at the beginning of AXISRAM.
At the time of working on this, I was not able to utilize VENCRAM for the SSBL.