Reduce memory usage to minimum, Bluepill, 64kBytes, simple GUI

Hello together,

I need a very simple GUI for a 128x128 TFT display (ST7735), i.e. text, rectangle, circle and lines and maximum 7…8 different colors.

I use platformio with stm32duino (framework arduino) and as board the bluepill STM32F103c8 with 64kBytes Flash and 20 KBytes RAM.

I have installed lvgl 8.0.1 and compiled the basic framework, without any graphics / objects.

I get the message ‘FLASH’ overflowed by 90944 bytes.

I read somewhere that it should be possible to reduce LVGL down to 8 KBytes, but I don’t know how and what to change in the lv_conf.h file for this.

I have set LV_COLOR_DEPTH to 8.

Is there any guide that shows what should be turned on/off and how?

Thank you for every hints.


Disabling unused elements in lv_conf.h does not help very much !
Best way is to do the followings:
1- Pass to the compiler two options:
2- Pass to the linker this option:

The above will result in big drop in flash usage.
I went through this in this forum two weeks ago, and here is the link:

Thank you very much. I have looked at the link. But I just have trouble classifying the numbers given. If I understand it correctly then the best possible usage is 170Kbytes for the flash, which is a lot?

I assumed that 50Kbytes or less should be possible…
In the last post, something is stated with 40Kbytes less, but then we are still over 100Kbytes? Is that correct?

Could it be that an earlier version of LVGL requires less memory?

In addition:
I have no idea where and how to pass the mentioned compiler and linker options with platformio :frowning:

I got it down to about 77K, which is ok with me.
I am not sure about getting it less than 40k…

I am not using PlatformIO, but I believe you change build/linker options inside file: platformio.ini in the build section.
Here is doc with examples: