Skip to main content
justin11
Senior
April 13, 2023
Question

Moving images / resources to external flash

  • April 13, 2023
  • 4 replies
  • 1962 views

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.

This topic has been closed for replies.

4 replies

Pavel A.
Super User
April 13, 2023

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?

justin11
justin11Author
Senior
April 13, 2023

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.

Tesla DeLorean
Guru
April 13, 2023

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 VenmoUp vote any posts that you find helpful, it shows what's working..
justin11
justin11Author
Senior
April 13, 2023

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

Tesla DeLorean
Guru
April 13, 2023

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 VenmoUp vote any posts that you find helpful, it shows what's working..
Pavel A.
Super User
April 16, 2023

> 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
Technical Moderator
April 20, 2023

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 SOYKURTST Software Developer | TouchGFX
justin11
justin11Author
Senior
May 2, 2023

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