How to cut lvgl

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to cut lvgl

5,627 次查看
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 项奖励
回复
7 回复数

5,601 次查看
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

5,593 次查看
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 项奖励
回复

5,610 次查看
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

5,594 次查看
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 项奖励
回复

5,568 次查看
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 项奖励
回复

5,519 次查看
linda4185
Contributor II

sorry sir

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

0 项奖励
回复

5,536 次查看
linda4185
Contributor II

yes.

 I will buil a new project when my program is done

0 项奖励
回复