How to cut lvgl

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to cut lvgl

2,868 Views
linda4185
Contributor II

hello every body.

         I was get code by gui guider. and build, it is success.

         result of build by keil:Program Size: Code=166246 RO-data=34594 RW-data=520 ZI-data=56392

     I just add a button an text.  It is too bigger then my mcu internal flash.

           I try to remove some file but can not build the code.

            so how I do?any Documentation?

0 Kudos
7 Replies

2,842 Views
zhenhualuo
NXP Employee
NXP Employee

To reduce the image size, you can also try to use optimization options with size optimized. 

-O2: balance optimization for size and speed.

-Oz: size optimization, disregards performance optimization

2,834 Views
linda4185
Contributor II

Thinks for reply.

   This  is an efficient and fast method but does not solve the problem at the source.

The reason is that will make some error when Optimization level set highest.

0 Kudos

2,851 Views
zongchunyu
NXP Employee
NXP Employee

Hello, 

To reduce the image size,  you can disable the unused widgets via the lv_conf.h file. 

for example, if you don't want to use the Image widget, you just need to update the following line in lv_conf.h:

#define LV_USE_IMG 1                       # change 1 to 0 can disable this widget

2,835 Views
linda4185
Contributor II

thinks for reply

   I close all items except btn,and build project. the image size about 84KB,

   then set size optimized O3, it will be zoom out to 64KB,but I give up it. 

0 Kudos

2,809 Views
brendonslade
NXP TechSupport
NXP TechSupport

Hi Linda,

would you be able to share the project or a small test case that shows this so we can confirm the behavior?

thanks

0 Kudos

2,760 Views
linda4185
Contributor II

sorry sir

   I made a mistake,the image size is code+ROdata,I just calculate code size.

0 Kudos

2,777 Views
linda4185
Contributor II

yes.

 I will buil a new project when my program is done

0 Kudos