...
Info |
---|
This is an add-on product that installs on top of the Linux BSP for the NXP i.MX RT board. It must be purchased separately from the Linux BSP product. |
1. Overview
This application note explains how to run the LVGL GUI in uClinux running on the i.MX RT devices. LVGL is the most popular free and open-source embedded graphics library to create powerful UIs for any MCU, MPU and display type. Refer to https://lvgl.io/ for detailed information on the LVGL GUI.
...
Full sources of the LVGL GUI, as well as pre-built LVGL binaries are provided.
2. Understanding Implementation
2.1. Understanding Integration and Build Framework
The LVGL sources, as well as some pre-built binaries, are integrated to the Emcraft uCLinux distribution in the A2F
directory. The following are the key LVGL directories available in the distribution:
...
benchmark_gui_demo
music_gui_demo
stress_gui_demo
widgets_gui_demo
.
2.2. Implementing I/O interactions
The
ebike
demo described below is available only in 480x272 resolution, so it is applicable to IMXRT10XX-EVKB board and display kit, but not to the IMXRT1170-EVK. Port to 720x1280 resolution is required to run the demo on the IMXRT1170-EVK target.
...
The integration and build provisions for ebike_gui_demo
are similar to the ones for the 4 standard LVGL demos described above. Once the demo is built, it is available on the target from the Emcraft standard rootfs
project.
2.3. Understanding Interface to Linux I/O Frameworks
The LVGL implementation in the Emcraft BSP is configured to use the standard Linux framebuffer
and input frameworks to support the display graphics and input for the LCD panel.
...
Both the Linux frame buffer and the LVGL internal rendering buffers are allocated in the on-chip SDRAM. This supports a 25 FPS, as measured with ebike
and other standard LVGL demos.
3. Running LVGL Demos
3.1. Running Standard LVGL Demos
Step through the following procedure to run the standard LVGL demos:
From the Linux shell, perform the following command to power on the LCD backlight:
Code Block / # echo 0 > /sys/class/backlight/backlight/bl_power
From the Linux shell, type the
benchmark_gui_demo
command to run thebenchmark
demo:Code Block / # benchmark_gui_demo
Type Ctrl-C to finish the demo:
Code Block / # benchmark_gui_demo ^C / #
Type the
music_gui_demo
command to run themusic
demo. Click to widgets icons on the touch panel to navigate the demo:Code Block / # music_gui_demo
Type Ctrl-C to finish the demo:
Code Block / # music_gui_demo ^C / #
Type the
stress_gui_demo
command to run thestress
demo:Code Block / # stress_gui_demo
Type Ctrl-C to finish the demo:
Code Block / # stress_gui_demo ^C / #
Type the
widgets_gui_demo
command to run thewidgets
demo. Click to widgets icons on the touch panel to navigate the demo:Code Block / # widgets_gui_demo
Type Ctrl-C to finish the demo:
Code Block / # widgets_gui_demo ^C / #
3.2. Running Emcraft Ebike Demo
The ebike demo is not available on the IMXRT1170-EVK board + display kit, port to resolution 720x1280 is required.
...
From the Linux shell, type the
ebike_gui_demo
command to run theebike
demo:Code Block / # ebike_gui_demo
Click to the padlock icon in the bottom right corner of the screen to switch to the Unlock Your Bike group.
Click 4 any digits and then
v
. Make sure the correct PIN-code in printed out to the Linux shell terminal:Code Block / # ebike_gui_demo entered pin: 4 7 1 2
Click to the bike icon to switch back to the Driving Information group.
Press and hold the
SW8
button which resides on the opposite side of the i.MXR10XX-EVKB board to LCD. Make sure that the Speed, Trip, Odometer and other values are increasing on the corresponding widgets on the LCD. If release theSW8
button the Speed reading is decreasing:
4. Building LVGL
4.1. Secure Download Area
Emcraft support the LVGL port to the i.MX RT as a paid add-on.
...
For the imxrt1170 BSP:
https://www.emcraft.com/imxrtaddon/imxrt1170/lvgl
The page is protected as follows:
Login: CONTACT EMCRAFT
Password: CONTACT EMCRAFT
4.2. Building LVGL
Step through the following procedure to apply the LVGL add-on and build the LVGL binaries:
...