2025-10-31 2:31 AM
Hello everyone,
I'm a beginner in embedded systems and I'm trying to flash my LVGL UI resources to the external QSPI flash (a W25Q64) on an STM32H743IIT6 using OpenOCD. I'm running into some issues with OpenOCD detecting the flash.
Here is what I have done so far:
Linker Script (.ld): I have defined the external flash memory region in my linker script and created a section named .lvgl_assets that points to this external flash address.
Data Placement: I'm using __attribute__((section(".lvgl_assets"))) in my code to place the UI resource data into this specific section.
Binary File: I have successfully generated a separate .bin file that contains only the data from the .lvgl_assets section.
My goal is to flash this .bin file to the W25Q64.
My OpenOCD Problem:
I am using the stm32h7x.cfg target file provided by OpenOCD. I saw that it contains a QSPI driver, so I added the following line to my config:
set QUADSPI 1
I then run OpenOCD with:
openocd -f interface/cmsis-dap -f target/stm32h7x.cfg
After it connects, I execute flash list in the telnet console, and this is the output:
{
name stm32h7x.bank1.cpu0
driver stm32h7x
base 0x08000000
size 0x100000
bus_width 0
chip_width 0
target stm32h7x.cpu0
}
{
name stm32h7x.qspi
driver stmqspi
base 0x90000000
size 0x0
bus_width 0
chip_width 0
target stm32h7x.cpu0
}As you can see, the QSPI flash (stm32h7x.qspi) is listed, but its size is 0x0.
When I try to get more information by running flash info 1, I get the following error:
No QSPI, no OCTOSPI at 0x52005000 No QSPI, no OCTOSPI at 0x52005000 error retrieving flash info #1 : stmqspi at 0x90000000, size 0x00000000, buswidth 0, chipwidth 0 QSPI flash bank not probed yet
I am confident that my external flash hardware (W25Q64) is wired correctly and is functional.
It seems OpenOCD is failing to probe or initialize the QSPI flash. Am I missing a configuration step? How can I properly configure OpenOCD to recognize the W25Q64 and allow me to flash my .bin file to it?
Thank you for any help you can provide!
Solved! Go to Solution.
2025-11-03 12:36 PM
> could this issue be related to the QSPI memory-mapped mode being enabled within my internal program?
It is unlikely. The debugger usually resets the MCU on connection so the memory-mapped mode resets.
So you already have the QSPI flash working in your program. To bypass all the nuisances of "external loaders" you can write another small program that uses the OpenOCD semihosting (see here) to read the data files from your PC and write to the flash.
2025-10-31 2:34 AM
Have you tried asking at https://forum.lvgl.io/ ?
2025-10-31 3:10 AM
My apologies, I did have a look, but I wasn't able to find any related posts on the LVGL forum.
It also seems to me that the core of this issue is more about flashing data to the QSPI-driven external flash using OpenOCD, rather than a problem specific to LVGL itself. That is why I haven't posted this query on the LVGL forum.
2025-11-01 9:50 AM
Do you already have the QSPI flash driver for your program? You'll need it anyway to access the flash.
2025-11-01 10:05 AM
Yes, the driver is ready. It has been tested and confirms that the external flash can be read and written to correctly.
As a follow-up question, could this issue be related to the QSPI memory-mapped mode being enabled within my internal program?
2025-11-03 12:36 PM
> could this issue be related to the QSPI memory-mapped mode being enabled within my internal program?
It is unlikely. The debugger usually resets the MCU on connection so the memory-mapped mode resets.
So you already have the QSPI flash working in your program. To bypass all the nuisances of "external loaders" you can write another small program that uses the OpenOCD semihosting (see here) to read the data files from your PC and write to the flash.
2025-11-03 11:30 PM
Thanks, I will try this solution. If I have more questions later, can I reply here for more help?
2025-11-03 11:40 PM
Hi @JontyLi
If you still have issues, do not hesitate to return to the Community, either by creating new threads or continuing this one (if related to the same initial topic). You are welcome.
2025-11-05 6:42 AM
I am trying, please give me some more time.