cancel
Showing results for 
Search instead for 
Did you mean: 

Moving images / resources to external flash

justin11
Senior

We have a custom STM32H7 2MB processor that we are running our project on fine.

I am interested if it is possible / recomended to store all my images and fonts on our external 4MB flash ?

The main reason i am looking to do this is to reduce the size of "on-site" firmware updates. Currently we have to use RS485 as a transport so this might be a benafit. to offload some of the standard png files to external flash?

Any pointers / advice would be approciated.

8 REPLIES 8
Pavel A.
Evangelist III

If there's a need to change or update the large images or fonts, how placing them in external flash can help to reduce the size? Perhaps, use compression?

Is your external flash QSPI to utilize the memory mapped mode?

The reason it would reduce the file size of updates as i was hoping there was a way not to include them in the regular firmware builds. Most of them are standard graphic that would not change so i was looking to include the images / fonts etc.. on the external flash like a drive. At manufacture the assets would be loaded onto the flash, maybe with a different build. Then the firmware would not include them in the compile.

The QSPI can be used as a 4KB sector FatFS drive, the Erase/Write is not fast, and it's not recommended for constant update/thrash usage, but holding materially static data files and images it would be fine. Then you'd need to load images by name.

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

thanks, im using the W25Q32JV so that should work.

Do you have any suggested info that i can read to show how to setup touchgfx so it uses assets from an external flash ? / "Loading images by name"

Thanks

I'm not sure how TouchGFX manages resources.

I'd hope they'd be a way of dealing with them other than large monolithic blobs built by the linker.

The method with the most traction would be where the QSPI is treated much like an SDMMC / eMMC

For updates over time you might want a text or similar file providing associativity between image or resource content, and files on the "disk"

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Pavel A.
Evangelist III

> At manufacture the assets would be loaded onto the flash, maybe with a different build. Then the firmware would not include them in the compile.

We use the same approach. Pre-loading and updating the assets in ext. flash separately from the app.

Our GUI is very simple, so we just have allocated the space for assets statically, not using any filesystem.

To make updates faster, use compression.

Osman SOYKURT
ST Employee

Hello justin1,

The short answer is yes, you can store your images and more generally your assets in a non-memory mapped Flash.

For the long answer, I would recommend you to see this article (and this one for the fonts) on our website, it explains how to make it :)

/Osman

Osman SOYKURT
ST Software Developer | TouchGFX

Thanks, In regards to using images from flash. Is there a guide on how to do this? Especially from a TouchGFX point of view?