Question
Creating Custom External Loader for STM32H573RIVx
Hello ST Community,
I’m developing a custom external loader for a GD25Q64E flash device and cannot get STM32CubeProgrammer to read/write/erase the external flash. I’ve attached a screenshot of the error reported by the programmer.
What I’ve done
- Followed the ST tutorial “External QSPI loader how to” External QSPI loader how to - STMicroelectronics.
- Verified read/write/erase work when exercised from main.c — no errors there.
- When running the loader, I see a hardfault reported in the CubeProgrammer “HardFault” tab. There is a hardfault at the end of loader_src.c in init(); I’m not sure whether that is expected.
- Project uses SPI3 with DMA and interrupts to talk to the external flash.
- I have also tested this with just polling and verified read/writing/erase work when exercised from main.c
Device and external flash info
- Flash: GD25Q64E
- SPI instance: SPI3 (Polling)
Questions:
- Any troubleshooting tips for getting the custom loader working with STM32CubeProgrammer (and diagnosing the hardfault shown in the programmer)?

