2314 views|4 replies

274

Posts

8

Resources
The OP
 

[Sipeed LicheeRV 86 Panel Review] 3- Transplanting LVGL [Copy link]

 This post was last edited by manhuami2007 on 2022-3-18 17:00

At first, I planned to use the official WAFT to achieve screen display, but I didn’t understand how to use it, so I decided to switch to a GUI.

LVGL is a lightweight GUI framework that is also used on many embedded devices. There are also Linux ported versions available online, so we decided to port LVGL to LicheeRV 86.

1. Preliminary preparation steps

First, you need to install the cross-compilation environment, because you need to use the cross-environment GCC to compile the project.

Then refer to the following webpage to download the project code. Because it is downloaded from GitHub, it is not easy to download. You can directly use the compressed package I provide below.

Embedded GUI Using Linux Frame Buffer Device with LVGL

The file used by Linux to control the screen is /dev/fb0. In Shell, you can use the command cat /dev/urandom > /dev/fb0to view the screen display. At this time, the screen displays snowflakes.

After confirming that you can control the screen, you can proceed with the subsequent operations.

2. Modify the project

The modifications to the project mainly include two areas:

  1. Makefile modification
  2. Modification of main.c

2.1 Modify the makefile

Because cross-compiled GCC is used, the CC in the makefile needs to be modified.

When riscv's GCC is enabled, you can call riscv's GCC through $CC, so modify it as follows (please refer to the project in the compressed package for complete modifications):

CC ?= $$CC  #将变量CC重新赋值

2.2 Modify main.c

/*Create a Demo*/
    lv_obj_t *parent = lv_obj_create(lv_scr_act());
    lv_obj_set_size(parent,480,480);

    lv_obj_t * head_lable = lv_label_create(parent);
    lv_label_set_text(head_lable,"T-HEAD & EEWORLD");

    lv_obj_align(head_lable,LV_ALIGN_TOP_MID,0,50);

As above, create a new label and assign a value to display.

3. Compile the project

Use the command in the root file of the project make allto compile the project. Finally, an executable file will be generated and pushed to the root folder of the development board demothrough ADB .demo

adb push demo /root

After the push is successful, adb shellconnect to the development board, enter the root folder, modify the demo permissions, and then execute.

cd root
chmod +x demo
./demo

4. Effect

5. Resources

demo (7.86 MB, downloads: 8)

This is the executable file that runs directly on the development board.

Because the project file exceeds 150MB, it exceeds my authority and needs to be uploaded to the resource center. The resource is still under review. If you need it, you can go to my download center to have a look. Because the original project exceeds 150MB, I deleted the parts that I thought might be useless, and did not recompile and verify after deletion.

This post is from Domestic Chip Exchange

Latest reply

Thanks to the original poster. I found the project you shared in the forum resource center and successfully compiled the demo case.   Details Published on 2022-3-27 00:17
 
 

306

Posts

5

Resources
2
 

Has the document been reviewed?

This post is from Domestic Chip Exchange
 
 
 

306

Posts

5

Resources
3
 

Based on your feedback, we think it is necessary to expand the capacity for users who have earned points. You can pay attention to it in the last 24 hours and upload the original project file.

This post is from Domestic Chip Exchange
 
 
 

155

Posts

1

Resources
4
 

Thanks to the original poster. I found the project you shared in the forum resource center and successfully compiled the demo case.

This post is from Domestic Chip Exchange

Comments

I'm glad to be able to help you. I've posted another thread on how to add touch screen functionality.  Details Published on 2022-3-29 16:55
 
 
 

274

Posts

8

Resources
5
 
sonicfirr posted on 2022-3-27 00:17 Thanks to the host, I found the project you shared in the forum resource center and successfully compiled the demo case.

I'm glad to be able to help you. I've posted another thread on how to add touch screen functionality.

This post is from Domestic Chip Exchange
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list