Issue with RW Data Initialization in External Memory Loader for STM32CubeProgrammer
Hello everyone,
We're currently working on an external memory loader project using Keil, targeting both the Keil FLM Downloader and STM32CubeProgrammer. (We convert the .axf output to .FLM or .STLDR accordingly.)
The flasher is designed to program an application into the external NOR Flash on the NUCLEO-H7S3L8 board using the XSPI interface.
Our work is based on the following reference project:
When we used the loader with the Keil FLM Downloader, everything works perfectly. The loader operates without issues.
However, when we switch to STM32CubeProgrammer, we encountered with RW is not being initialized properly.
We’ve ensured that the relevant RW data region in the scatter file have load and execution addresses set to AXI SRAM (0x24000000).
Despite this, it appears that CubeProgrammer copies the data from AXI SRAM to ITCM (0x00000000).
We believe, CubeProgrammer might be running a some kind of startup code and during that process, the initial values of RW variables are lost.
At this point, we dont know what exactly CubeProgrammer is doing during startup.
What's confusing is that we use the exact same codebase for the Keil FLM loader, and it runs flawlessly.
Any insights, suggestions, or clarification on how CubeProgrammer handles memory initialization and startup routines would be greatly appreciated.
Thank you in advance!
