cancel
Showing results for 
Search instead for 
Did you mean: 

Image takes up a lot of FLASH space

MMerc.1
Senior

Hi,

I want to use an image but it takes up a lot of space in FLASH memory when I add it.

Example:

Image size ------ (no image) ---- 7.55 KB -------- 2.38 KB (same picture but compressed)

FLASH (free) ---- 811.97KB ----- 385.55 KB ----- 385.55 KB

(Instead of) -------------------------- 804.42 KB ----- 809.59 KB

I don't understand why...

Do you have the same problem?

Best Regards

15 REPLIES 15

Maybe not from uSD, but as far, as i could see, you use the f746 discovery board ... It has 16MB QSPI flash, you can use ... There are some good videos and tuts out there, i can check them out and provide links later (i´m at work atm and don´t have my toolchain here...)

If you can send me examples, I'll take it.

But the problem with QSPI is that couldn't contain all the images...

Hi :)

It´s very hard to believe for me, that 16MBytes of space are not enough for a GUI, but on the other side i don´t know, what you´re planning to do ;)

If it HAS to be uSD-storage, there´s a document, i found...

https://touchgfx.zendesk.com/hc/en-us/articles/207460605

But anyway: This approach needs definitely very good knowledge about hardwareconfiguration... Just to bring the uSD to life is a task, which can drive you insane (just my experience with ST´s HAL-drivers and many other bugs...). Step by step Tutorials about this are just not existent :(

If you want to give the qspi-approach a quick try: watch this Video (and maybe also the whole channel of that guy :) )

https://www.youtube.com/watch?v=12KXreXaLp0

Since CubeIDE 1.3 and FW 1.16 (the blank UI is based on FW 1.15), at some point it´ll ask to migrate... Just answer "Yes" at that point...

A little bit deeper below the surface is this channel:

https://www.youtube.com/channel/UCS1CM3mQiwlDU2nIVXroEtQ

He also has a very good video, what describes the manual qspi-setup via CubeMX and linkerscript...

Show me your map file. We should quickly be able to see what's going on. Maybe you have a 1000000000000x100000000000 image somewhere taking up all the space ^_^ There's nothing magical about reading a pixel from an image and writing the value in an array. It is what it is, nothing TouchGFX specific. These are the values of the pixels in your images based on bit depth of the application.

Your images probably aren't what you think they are.

/Martin

MMerc.1
Senior

Hi,

Thanks to @Karl Hönemann for giving me explanations on QSPI : I can store all my images there.

But the end goal is to use the uSD. So if you have information about it, you can send me a message.

I have a few questions about QSPI : is it a component ? Where is it ?

An off topic question : how can I update the program with a USB device ?

See my subject : https://community.st.com/s/question/0D50X0000C9f4YmSQI/how-can-i-load-the-binary-file-via-usb

AndrewM
Associate III

FWIW I faced a somewhat similar situation recently and found I couldn't use all the png's supplied by the graphical artist because the space required was too large. Luckily the images contain lots of similarity and large portions of identically coloured areas (as I see your image does as well). So I was able to use gimp to eg snip the corners from the image and use these as the graphical assets then programatically fill in the internal areas using touchgfx::Box etc.