cancel
Showing results for 
Search instead for 
Did you mean: 

How to program graphical icons to external memory via QSPI?

SLavi
Associate II

Hello Community,

I have an STM32F7-DISCO board which I am using to prototype a smart home system. The project is graphics intensive thereby eating up the 1MB Flash memory. I studied the Demonstration project of ST and I see that the icons are programmed to the external memory available on the board via QSPI.

I have tried to ensure that I do everything as the DEMO project such as defining the memory address in the scatter file, using the BSP functions for QSPI and using constant storage. When programming the hex file with ST LINK Utility the program does load but gives me a USB communication Error and error occured during program operation. The Icons are missing and checking the memory registers (from 0x90000000 there is no data on them)

Is there anything that I am missing that I am supposed to do? I have extensively checked the APP note AN4760 about QSPI interface on STM32 MCUs and I cannot figure out why it is not working.

The code added to scatter file is as follows:

LR_QSPI 0x90000000 0x1000000 {

ER_QSPI 0x90000000 0x1000000 {

*.o (.ExtQSPIFlashSection)

 }

}   

BSP functions used:

 BSP_QSPI_Init();

 BSP_QSPI_MemoryMappedMode();

For icon storage to memory the following code is used:

extern GUI_CONST_STORAGE GUI_BITMAP Image3;

#if defined ( __ICCARM__ )

#pragma location="ExtQSPIFlashSection" 

#else

__attribute__((section(".ExtQSPIFlashSection")))

#endif

Is there anything else I need to configure or am I doing the process wrong?

Any help will really be appreciated

Regards

Salman

#QSPI​  #Qspi-flash​  #[STM32 MCUs]​ 

2 REPLIES 2

Review the .MAP file, confirm the data/section placements and naming.

Make sure the Debug/Flash settings have the appropriate algorithm selected for the 0x90000000 region.

Dump the memory in the debugger, once enabled, check against expected.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
SLavi
Associate II

@Community member​  Thank you for your advice and quick responses as always. I discovered the STM32CubeProgrammer and used that to program my project. It worked! All icons are now showing. Any particular reason why STMLINK-Utility failed? I had chosen the board external loader and the utility is up to date and does program the demo project without a problem. I am baffled as to why it gave errors.