There are many embedded GUI libraries available on the market, including open-source GUI libraries such as LVGL and EmWin, and closed-source GUI libraries like TouchGFX and Persimmon GUI.
The testing board for this development tutorial comes from Tronlong Technology’s TLT113-EVM industrial evaluation board, which is based on the Allwinner Technology T113-i dual-core ARM Cortex-A7 + Xuantie C906 RISC-V + HiFi4 DSP heterogeneous multi-core processor design, with the ARM Cortex-A7 processor unit clocked at up to 1.2GHz.
The evaluation board consists of a core board and an evaluation baseboard, with all components such as CPU, ROM, RAM, power supply, and crystal oscillator on the core board adopting domestic industrial-grade solutions, achieving 100% localization. At the same time, most components on the evaluation baseboard also use domestic industrial-grade solutions. The core board has undergone professional PCB layout and high and low-temperature testing verification, making it stable and reliable, suitable for various industrial application environments.
Diagram of Hardware Resources for T113-i Industrial Evaluation Board
In addition, the T113-i industrial development board has rich interface resources, capable of supporting dual Ethernet ports, dual CAN, dual USB, dual RS485, RS232, and other communication interfaces. It also provides multimedia interfaces such as LVDS LCD, TFT LCD, MIPI LCD, HDMI OUT, CVBS IN/OUT, LINE IN, MIC IN, H/P OUT, and has onboard WIFI and 4G (optional) modules, supporting 1080P@60fps JPEG/MJPEG video hardware encoding, and 4K@30fps H.265, 4K@24fps H.264 video hardware decoding, facilitating quick product solution evaluation and technical research for users.
Get detailed specifications and other materials for T113-i
Long press the QR code to recognize and download
This article mainly describes how to port LVGL 8.1 to Tronlong Technology’s T113-i development board.
LVGL
-
LVGL, short for “Littlev Graphics Library”, is an open-source graphics library mainly used for creating graphical user interfaces (GUIs) on embedded systems. It is written in C and is designed to be efficient and customizable, making it popular for developing user interfaces on various microcontroller platforms and display hardware.
-
Features of LVGL
-
Lightweight: LVGL is designed to be lightweight and efficient, suitable for resource-constrained embedded systems with limited memory and processing power. -
Highly customizable: LVGL allows developers to customize the appearance and behavior of GUI elements according to project requirements. -
Widget library: It provides a variety of pre-designed graphical widgets such as buttons, labels, sliders, lists, etc., to simplify the creation of interactive user interfaces. -
Event-driven: LVGL is event-driven, meaning it responds to user input and other events to trigger actions or state changes. -
Hardware support: LVGL supports various display and input hardware, including different types of displays (TFT, OLED, etc.) and input devices (touch screens, buttons, etc.). -
Active community: LVGL has an active and supportive community that provides resources and assistance to developers. -
Cross-platform: LVGL can be used on various microcontroller platforms, making it suitable for different embedded systems.
-
Open-source link for LVGL: https://github.com/lvgl

Porting LVGL
Download Source Code Repository
-
LVGL code download link: https://github.com/lvgl/lvgl/archive/refs/tags/v8.1.0.tar.gz -
lv_demos code download link: https://github.com/lvgl/lv_demos/archive/refs/tags/v8.1.0.tar.gz -
lv_drivers code download link: https://github.com/lvgl/lv_drivers/archive/refs/tags/v8.1.0.tar.gz -
lv_port_linux_frame_buffer code download link: https://github.com/lvgl/lv_port_linux_frame_buffer.git, download via git clone, then switch to the v8.2 branch.
After writing all the code, the code directory is as follows:

Source File Porting
-
Create a directory: lvgl, to store our project source code. -
Copy the lvgl source code into the lvgl directory. -
Copy the lv_drivers source code into the lvgl directory. -
Copy the lv_demos source code into the lvgl directory. -
Copy lv_conf_template.h from lvgl to lvgl and rename it to lv_conf.h. -
Copy lv_drv_conf_template.h from lv_drivers to lvgl and rename it to lv_drv_conf.h. -
Copy lv_demo_conf_template.h from lv_demo to lvgl and rename it to lv_demo_conf.h. -
Copy main.c and Makefile from lv_port_linux_frame_buffer to lvgl.
After the file porting is complete, the code directory is as follows:

Modify Configuration Files
-
Modify lv_conf.h, this file is the configuration file for lvgl.
-
Enable the lv_conf.h header file by changing #if 0 to #if 1.

-
Select the size of the pixel format corresponding to the pixel point based on the driver (can be viewed in the device tree), otherwise the display may be garbled.

-
Modify the video memory size.

-
Set the Tick timer configuration function.

-
Check the log, enable LV_USE_LOG, set the log level to print and choose the log printing interface.

-
The sample tested uses fonts of different sizes, so enable the fonts used.

-
Modify lv_drv_conf.h, this file is the driver configuration file.
-
Enable the lv_drv_conf.h header file by changing #if 0 to #if 1.

-
Enable LCD display: enable USE_FBDEV, set the path to /dev/fb0, and configure according to the actual situation of the board’s LCD.

-
Enable mouse or touch screen.

-
Modify lv_demo_conf.h, this file is the configuration file for test cases.
-
Enable the lv_demo_conf.h header file by changing #if 0 to #if 1.

-
Enable the LV_USE_DEMO_WIDGETS test case.

-
Modify the main.c file, this file is the main program for lvgl.
-
Modify the lvgl demo header files.

-
Modify the display ratio for lvgl; I am using an HDMI screen with a resolution of: 1920 * 1080.

-
Modify the mouse configuration; my mouse device node is: /dev/input/event5.
-
Modify the Makefile, this file is the build script for the project.
-
Modify the build toolchain path, select the cross-toolchain for T113-i, the toolchain path is: xxx/T113-i_v1.0/out/gcc-linaro-5.3.1-2016.05-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc.

-
Since the toolchain does not support the compile option -Wshift-negative-value, directly remove the corresponding compile option.

-
Since there is no mouse icon file, comment out the mouse icon configuration.

-
Add the compilation of test samples, including its build script.

LVGL Compilation Verification
-
Compile, build in the lvgl project directory, execute the make command.


-
After compilation, an executable demo file will be generated in the current directory.

-
Verification, we will copy the executable demo file to the board.

-
Run the LVGL instance on the board.

-
Running results:
Conclusion
-
The porting of LVGL on Linux is relatively simple and quick; only a few configuration files need to be modified to run on the target, which is very convenient for deploying UI. -
The overall performance of LVGL running on T113-i is satisfactory, and it is suitable for some project implementations. -
LVGL is cross-platform, so writing an application can be deployed on multiple platforms, avoiding the repetitive development process.

About Tronlong Technology
Founded in 2013, Tronlong Technology is a leading provider of embedded product platforms in China, with business covering industrial core boards, industrial evaluation boards, industrial single-board computers, and project services. The headquarters is located in Guangzhou Science City, with independent operational teaching and instrument divisions, and business and technical service centers in Beijing, Tianjin, Shanghai, Nanjing, Shenzhen, Xi’an, Chengdu, and other cities.
For more than 10 years, Tronlong Technology has focused on ARM, FPGA, and DSP heterogeneous multi-core technology development, adhering to the “domestic + imported” dual-engine product strategy, and is a gold partner of Allwinner and Rockchip, as well as an official partner of TI, NXP, Xilinx, and Unisoc in China, providing application platforms for technologies such as real-time systems, field buses, IoT, and artificial intelligence, with products widely used in industrial automation, energy and power, instrumentation, medical, communication, and security industries.



Sales Email: [email protected]
Technical Email: [email protected]
Tronlong Switchboard: 020-8998-6280
Technical Hotline: 020-3893-9734
Tronlong Official Website: www.tronlong.com
Technical Forum: www.51ele.net
Official Mall: tronlong.tmall.com
