Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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:

  1. From the Linux shell, perform the following command to power on the LCD backlight:

    Code Block
    / # echo 0 > /sys/class/backlight/backlight/bl_power
  2. From the Linux shell, type the benchmark_gui_demo command to run the benchmark demo:

    Code Block
    / # benchmark_gui_demo

    image-20250119-081644.png

    Type Ctrl-C to finish the demo:

    Code Block
    / # benchmark_gui_demo 
    ^C
    / # 
  3. Type the music_gui_demo command to run the music demo. Click to widgets icons on the touch panel to navigate the demo:

    Code Block
    / # music_gui_demo

    image-20250119-081706.png

    Type Ctrl-C to finish the demo:

    Code Block
    / # music_gui_demo 
    ^C
    / # 
  4. Type the stress_gui_demo command to run the stress demo:

    Code Block
    / # stress_gui_demo

    image-20250119-081727.png

    Type Ctrl-C to finish the demo:

    Code Block
    / # stress_gui_demo 
    ^C
    / # 
  5. Type the widgets_gui_demo command to run the widgets demo. Click to widgets icons on the touch panel to navigate the demo:

    Code Block
    / # widgets_gui_demo

    image-20250119-081752.png

    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.

...

  1. From the Linux shell, type the ebike_gui_demo command to run the ebike demo:

    Code Block
    / # ebike_gui_demo
  2. Click to the padlock icon in the bottom right corner of the screen to switch to the Unlock Your Bike group.

    image-20250119-081926.png

  3. 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
  4. Click to the bike icon to switch back to the Driving Information group.

  5. 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 the SW8 button the Speed reading is decreasing:

    image-20250119-082015.png

4. Building LVGL

4.1. Secure Download Area

Emcraft support the LVGL port to the i.MX RT as a paid add-on.

...

Password: CONTACT EMCRAFT

4.2. Building LVGL

Step through the following procedure to apply the LVGL add-on and build the LVGL binaries:

...