cancel
Showing results for 
Search instead for 
Did you mean: 

How to store images for Touchgfx to external flash

busenuremir
Associate

I use w25q128 as an external spi nor flash for stm32f429 discovery kit because internal flash is not enough to store lots of images. I can read and write the flash by the library but I do not know how to connect it with touchgfx files.

Below declarations are added into FLASH.ld file:

SPIFLASH    (r)        : ORIGIN = 0x90000000,   LENGTH = 4M

and

ExtFlashSection :
 
   {
 
     *(ExtFlashSection ExtFlashSection.*)
 
     *(.gnu.linkonce.r.*)
 
     . = ALIGN(0x4);
 
   } >SPIFLASH
 
 
 
   FontFlashSection :
 
   {
 
     *(FontFlashSection FontFlashSection.*)
 
     *(.gnu.linkonce.r.*)
 
     . = ALIGN(0x4);
 
   } >SPIFLASH
 
 
 
   TextFlashSection :
 
   {
 
     *(TextFlashSection TextFlashSection.*)
 
     *(.gnu.linkonce.r.*)
 
     . = ALIGN(0x4);
 
   } >SPIFLASH
 

6 REPLIES 6
Romain DIELEMAN
ST Employee

Hi,

This settings in the flash loader seem fine to me.

In TouchGFX Designer have you set the dafault image configuration to use the external flash section ? This can be done by clicking the Config icon in the bottom left of TouchGFX Designer and going to the Default Image Configuration tab. There you can set the section and extra section to ExtFlashSection to store/use images in external flash.

0693W00000JNPSHQA5.png 

You can also decide to individually store images in internal or external flash when going to the Images section in the top left of TouchGFX Designer and setting the section and extra section to your choice.

/Romain

Hi Mr. Dieleman,

Thank you for responding. I have already done that part, and memory details are as shown below.

0693W00000JNUBVQA5.png 

The problem is there is a white screen instead of my design, and it falls into hard fault. What is the thing that I missed?

0693W00000JNUCxQAP.png

There could be different origin for this issue :grinning_face_with_sweat: Difficult to say without seing your project. Did touchgfx work before you enabled external flash ? I suppose you had a look at the Board Bring Up articles already as well.

/Romain

ssipa.1
Associate II

If there is no configuration that matches the memory you use, the MCU, and the pin connection, you need to write your own external flash loader which will be a .stldr file. There is a video tutorial from ST: https://github.com/vlcekji2/External-Loaders

@ssipa.1 

I just came across this thread. And I am trying to do something similar now that I am designing the electronics.

You mentioned "If there is no configuration that matches the memory you use, the MCU, and the pin connection, you need to write your own external flash loader which will be a .stldr file" and I want to avoid that for a number of reasons.

So how do I find a reference schematic (or general info with part number and preferred connections) so I can use off-the shelf configuration in TouchGFX?

 

Thank you

the cube programmer contains many different stldr files for evaluation boards. choose one of the nucleo or discovery boards that contain the flash memory and controller you need, and maybe you'll be lucky and the file you need will be in the cube programmer. then all you need is to accurately copy the part of the evaluation board's circuit where the controller connects to the flash memory
sorry for my English, which isn't even mine but Google's