2025-02-05 5:25 AM
Hi, I'm trying to do an external loader according ST's MOOC and this forum https://community.st.com/t5/stm32-mcus-products/stm32h5-external-loader/td-p/601134.
My code pass on all ST's tests of memory, but when I generate a stldr it does not read on cubeprog.
I attached my project and log of cubeprog.
I already do the same with a G474 without problems.
BR
2025-11-26 10:44 PM
Hello, dear MMira.4,
Have you managed to solve the problem?
I'm stuck in exactly the same place.
2025-11-27 11:24 PM
Dear colleagues,
Update.
I got the bootloader working. The problem was with the linker and its settings. I followed the instructions in https://community.st.com/t5/stm32-mcus-products/stm32h563-custom-external-loader-issues/td-p/705685
and it started working. I didn't have such problems with the H7 series.
2025-11-27 11:26 PM
And yes, I forgot...
Before each function (Read, Erase), you need to re-init for OSPI. At the end of the init, I had to insert a small delay.
2025-12-04 12:03 PM
Hi, and I'm trying yet....can you share your code?
2025-12-04 8:06 PM
Hi,
The main problem with init when starting the loader was related to incorrect linking. I followed the instructions in https://community.st.com/t5/stm32-mcus-products/stm32h563-custom-external-loader-issues/td-p/705685.
In the linker file, the following text section must be explicitly written:
KEEP (*(.text.Init))
KEEP (*(.text.DeInit))
KEEP (*(.text.Write))
KEEP (*(.text.Read))
KEEP (*(.text.Verify))
KEEP (*(.text.Checksum))
KEEP (*(.text.SectorErase))
KEEP (*(.text.MassErase))
and leave the "Discard unused sections" checkbox enabled in the linker settings.
After this, the bootloader stopped throwing errors on startup, but QSPI remained inconsistent.
Some modifications to the bootloader itself were required to get it working.
I'm attaching the linker and bootloader files.
I hope this helps.
2025-12-05 4:36 PM
Can you send it to some drive? your attachament have a bug on this forum "extLoader.rar (Virus scan in progress ...)"
Thank you a lot for helping me.
2025-12-07 10:30 PM
Hi!
Link to the file -
https://drive.google.com/file/d/1HC2esLOwwCJ56-BfVL3yxoBkUsDgOCwr/view?usp=sharing
If you can't upload it, I can email it to you.