726 views|5 replies

156

Posts

3

Resources
The OP
 

GigaDevice GD32H759I-EVAL LVGL transplant [Copy link]

 This post was last edited by Misaka10032 on 2024-6-12 14:04

Hello everyone, today's tutorial is to share with you how to port LVGL to the GD32H759I-EVAL development board. Through this tutorial you will learn how to port LVGL

1 - Download

链接已隐藏,如需查看请登录或者注册

We can download the LVGL distribution on GITHUB, you can choose the version you want to use. For the Chinese manual of LVGL, you can refer to Baiwen.com

2- Unzip and prepare the required files

After decompressing LVGL, you can get the required files as shown below

3- Start transplanting

We only need to keep three folders: demos, examples and src. demos includes the official demo examples, examples includes the official LVGL example component examples. Src includes the LVGL source code files.

For LVGL porting, we only need the porting folder under example. I copied it directly without deleting other unnecessary files. The following figure shows the prepared files.

Rename lv_conf_template.h to lv_conf.h

As shown below:

Create a new folder and arrange the above folders in the following tree directory

Copy the current directory to your project and add a new directory grouping in Keil for better display and editing of files.

Added search path for file compilation

At this point, the preparations are complete, but in order to use LVGL, you still need a screen driver. That is, the screen dot function, which is used to draw a dot at the X, y position on the screen. We integrate this function into LVGL, and LVGL can help us draw beautiful interfaces.

You don't need to implement the screen functions yourself. If you are using the GD32H759I-EVAL development board, the official has already prepared it for you. The driver functions are in the Utilities folder under the firmware library.

As shown below:

At this point, you need to copy these two files into your project and include them in the compilation path. Note that this driver function also includes LCD_font and sdram, which can be included together.

At this point you are ready.

Next, we open the following figure and introduce the LCD driver file in the source file of the transplanted file.

Call the initialization method of LVGL to initialize the LCD and configure the buffer of LVGL. You can choose any one of the three.

In the 160th line below, call the LCD dot function in the screen refresh function

Finally, don't forget to resize your screen

At this point the configuration part is complete.

Next, let's run the official demo. We can create a new folder and include the demo files in the previously created folder, as shown in the following figure

Configure its compilation path

Introduce the LVGL initialization file and demo file library into the main program

Don't think that's all. You also need to provide LVGL with a heartbeat for animation display. So you also need to configure a timer in the main program to provide LVGL with a heartbeat regularly.

Main program function, initialize the timer in the main program, initialize LVGL and call the lv_timer_handler function every 5ms.

Open the project example you imported and want to demo in the LVGL.conf file

Compile and burn it to the development board. If you think the downloader is too slow, you can try the following adjustments

The effect is as follows:

Code:

07-LVGL.zip (14.36 MB, downloads: 14)

This post is from Domestic Chip Exchange

Latest reply

There are many domestic development tools, I won't name them here, but they are all rogue, requiring you to register personal information, phone address, etc., and can only be operated online, etc. Once you are tied up, they will start to harvest. I would rather use a one-time paid software than domestic software. The survival of technology and technicians cannot be measured by patriotism. This is an indisputable fact.   Details Published on 2024-7-7 16:37
 
 

6829

Posts

11

Resources
2
 
Thank you for sharing, especially sharing the source code, which is rare. But I looked at the part of the plot point, is there any room for optimization?
This post is from Domestic Chip Exchange

Comments

I personally think this should be a fixed way of writing. Do you have any good suggestions?  Details Published on 2024-6-12 22:15
 
 
 

156

Posts

3

Resources
3
 
lugl4313820 posted on 2024-6-12 15:54 Thank you for sharing, especially sharing the source code, which is rare. However, I looked at the part of the point drawing, is there any room for optimization?

I personally think this should be a fixed way of writing. Do you have any good suggestions?

This post is from Domestic Chip Exchange

Comments

If you want to increase the refresh rate, this can be a bit slow, so it is best to use DMA for transmission.  Details Published on 2024-6-13 07:19
 
 
 

6829

Posts

11

Resources
4
 
Misaka 10032 posted on 2024-6-12 22:15 I personally think this should be a fixed way of writing. Do you have any good suggestions?

If you want to increase the refresh rate, this can be a bit slow, so it is best to use DMA for transmission.

This post is from Domestic Chip Exchange
 
 
 

6064

Posts

4

Resources
5
 

It would be nice if domestic chips could have their own development environment. They can't always rely on Keil and IAR.

This post is from Domestic Chip Exchange

Comments

There are many domestic development tools, I won't name them here, but they are all rogue, they require you to register personal information, phone address, etc., and they can only operate online, etc. Once they have bundled you, they will start to harvest. I would rather use a paid software than domestic software. Technology and technicians' survival cannot be measured by patriotism.  Details Published on 2024-7-7 16:37
 
 
 

39

Posts

15

Resources
6
 
damiaa posted on 2024-6-13 08:58 It would be great if domestic chips could have their own development environment. We can't always rely on Keil and IAR.

There are many domestic development tools, I won't name them here, but they are all rogue, requiring you to register personal information, phone address, etc., and can only be operated online, etc. Once you are tied up, they will start to harvest. I would rather use a one-time paid software than domestic software. The survival of technology and technicians cannot be measured by patriotism. This is an indisputable fact.

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