cancel
Showing results for 
Search instead for 
Did you mean: 

How to store video in external flash in TouchGFX?

psilvaggio
Associate III

In TouchGFX Designer, images can be easily be stored in external flash by designating the Section to ExtFlashSection within the program itself. As far as I can tell there is no way to do this for videos using the user interface.

 

I know the images are designated to external flash using "LOCATION_PRAGMA("ExtFlashSection")" within the image's .cpp file. Is this the appropriate statement for video files and where should the statement be placed? There is no video.cpp file, there is a video.bin file and a reference to it in the VideoDatabase.hpp file.

 

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

Hello @psilvaggio,

TouchGFX will automatically place the videos in the ExtFlashSection, therefore, you don't need to handle it. 

Don't hesitate to ask more questions if you have any!

Best regards,

Mohammad MORADI
ST Software Developer | TouchGFX

View solution in original post

5 REPLIES 5

Hello @psilvaggio,

TouchGFX will automatically place the videos in the ExtFlashSection, therefore, you don't need to handle it. 

Don't hesitate to ask more questions if you have any!

Best regards,

Mohammad MORADI
ST Software Developer | TouchGFX

HI,

Can I place some portions of the Touch GFX application code inside the external flash, the code for screens? I am using an  External quad SPI flash  for Storing Assets, Can the same thing be used for storing the Application code of Touch GFX using keywords like  

LOCATION_PRAGMA("Ext Flash Section")

KEEP

 

Thanks

Hello @jijomathew ,

 

It should be possible to store the "program's code" in external memory just like the assets.

To do so, make sure your microcontroller suppoprts XIP (eXecute In Place).
Then you will have to modify the memory mapping, linker script, bootloader and IDE configuration.
This is quite a bit of work for something that is not usually recommended.

It is better to have the program's code in internal memory because it will make your program faster and usually there is enough space to store it.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)

Hello

 

__attribute__((section("Ext Flash Section"))) This keyword I am using to place the code in external flash, This is the demo code, __attribute__((section("Ext Flash Section")))void C_47View::menu scroll down(){ }, after building the code it is successfully stored in External Flash it is showing in build analyzer.  After flashing this code also it is running as expected, Ext Flash Section is where  Touch GFX  stores the image, where I Have placed my above-mentioned application code. My Doubt is whether this technique is fine to proceed or not.

 

Thanks and Regards 

JIJO

 

Hi,

In My Application, there are 200 screens and each of these screens has some application code to change the Text variable and switch between the widgets. I already tried with  0's optimization For G++ still internal flash is not enough to accommodate the code, So please suggest a preferable solution.

 

Thanks and regards 

JIJO