Skip to content

lvgl/lv_port_texas_sk-am62b-p1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LVGL ported to AM62B-P1 (TI)

Overview

This guide provides steps to setup the SK-AM62B-P1 and to cross-compile an LVGL application to run it the target.

Buy

You can purchase the SK-AM62B-P1 board from TI website.

Benchmark

The default buffering is fbdev.

Frame buffer, 1 thread

Name Avg. CPU Avg. FPS Avg. time render time flush time
Empty screen 37.00% 24 14 5 9
Moving wallpaper 86.00% 15 57 48 9
Single rectangle 14.00% 28 1 1 0
Multiple rectangles 35.00% 28 10 6 4
Multiple RGB images 79.00% 29 27 18 9
Multiple ARGB images 70.00% 29 22 13 9
Rotated ARGB images 85.00% 23 36 27 9
Multiple labels 73.00% 27 24 15 9
Screen sized text 88.00% 18 48 39 9
Multiple arcs 75.00% 28 24 15 9
Containers 44.00% 27 12 10 2
Containers with overlay 88.00% 15 57 48 9
Containers with opa 72.00% 22 31 26 5
Containers with opa_layer 91.00% 15 58 49 9
Containers with scrolling 86.00% 26 31 22 9
Widgets demo 30.00% 24 14 11 3
All scenes avg. 65.00% 23 29 22 7

Frame buffer, 4 threads

Name Avg. CPU Avg. FPS Avg. time render time flush time
Empty screen 37.00% 24 14 5 9
Moving wallpaper 80.00% 28 28 19 9
Single rectangle 11.00% 28 1 1 0
Multiple rectangles 37.00% 29 12 8 4
Multiple RGB images 54.00% 27 19 10 9
Multiple ARGB images 56.00% 28 18 9 9
Rotated ARGB images 66.00% 29 21 12 9
Multiple labels 56.00% 28 17 8 9
Screen sized text 75.00% 27 25 16 9
Multiple arcs 56.00% 28 17 8 9
Containers 36.00% 27 10 8 2
Containers with overlay 83.00% 22 36 27 9
Containers with opa 57.00% 28 16 14 2
Containers with opa_layer 77.00% 24 31 26 5
Containers with scrolling 71.00% 28 23 14 9
Widgets demo 29.00% 26 11 8 3
All scenes avg. 55.00% 26 18 12 6

The other configurations are:

  • DRM
  • Wayland

Any of these buffering strategies can be used with multiple threads to render the frames.

Specification

CPU and memory

  • MCU:

    • AM625 with Quad 64-bit Arm Cortex-A53 up to 1.4GHz
    • 1 Arm Cortex-M4F
  • RAM: 2GB DDR4

    • 16-bits data bus with inline EEC
    • Supports speeds up to 1600 MT/s
  • Flash: 32GB SD

  • GPU: PowerVR

Display

  • Screen: HDMI 1920x1080 touchscreen

Connectivity

  • 1 Type-A USB 2.0
  • 1 Type-C dual-role device (DRD) USB 2.0 supports USB booting
  • UART
  • USB
  • Onboard XDS110 Joint Test Action Group (JTAG) emulator
  • 4 universal asynchronous receiver-transmitters (UARTs) via USB 2.0-B
  • Ethernet

Getting started

Hardware setup

This document from TI provides detailed information for the hardware setup

  • Connect to the board the following:

    • UART
    • Power
    • Screen (HDMI)
    • Ethernet (Connect the board to the same LAN the host is, the board obtains an IP address from DHCP)
  • SD card is needed to flash the image.

    • Follow the guide to download a pre-built .wic image

    • Follow this guide to build the image with Yocto

  • If there are problems encountered flashing the SD card with BalenaEtcher as mentioned in the documentation, use this command instead:

    # Mount the SD on your system and find where it was mounter (e.g.: sda, sdb)
    sudo dd if=path/to/am62-image.wic of=/dev/sdX bs=4M status=progress conv=fsync
  • The demo application should be displayed on the screen.

Software setup

This guide was tested on Ubuntu 22.04 host.

Install docker

  • Follow this tutorial to install and setup docker on your system.

  • Support to run arm64 docker containers on the host:

    sudo apt-get install qemu-user-static
    docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

Install utilities

sudo apt install picocom nmap

Run the default project

Clone the repository:

git clone --recurse-submodules https://github.com/lvgl/lv_port_texas_sk-am62b-p1.git

Build the docker image and the lvgl benchmark application:

cd lv_port_texas_sk-am62b-p1
./scripts/docker_setup.sh --build
./scripts/docker_setup.sh --run

Run the executable on the target:

  • Get the IP of the target board:

    • Option 1: from the UART, on the board:

      sudo picocom -b 115200 /dev/ttyUSB0
      ## Then inside the console, log as "root", no password required
      ## Then retrieve the ip of the board
      ip a
    • Option 2: Get the IP from your host with nmap

      ## Find the IP of the board. You need to know your ip (ifconfig or ip a)
      ## HOST_IP should be built like this :
      ## If the ip is 192.168.1.86, in the following command HOST_IP = 192.168.1.0/24
      nmap -sn <HOST_IP>/24 | grep am62xx
  • Then transfer the executable on the board:

    scp lvgl_port_linux/bin/lvgl-app root@<BOARD_IP>:/root
  • Start the application

    ssh root@<BOARD_IP>
    
    ## stop default presentation screen if it is running
    systemctl stop ti-apps-launcher
    ######################################
    ## WARNING: do not stop these services if using wayland demo
    systemctl stop weston.socket
    systemctl stop weston.service
    ######################################
    
    ./lvgl-app

Change configuration

Some configurations are provided in the folder lvgl_conf_example .

The default configuration used is lv_conf_fb_4_threads.h. To change the configuration, modify the lvgl_port_linux/lv_conf.h file with the desired configuration.

Also modify the lvgl_port_linux/CMakelists.txt file option:

option(LV_USE_WAYLAND "Use the wayland client backend" OFF)
option(LV_USE_SDL "Use the SDL backend" OFF)
option(LV_USE_DRM "Use the libdrm backend" OFF)

Default backend is fbdev. Only set 1 of these options to "ON" and ensure it's coherent with lv_conf.h. This can also be changed from the script scripts/build_app.sh.

Start with your own application

The folder lvgl_port_linux is an example of an application using LVGL.

LVGL is integrated as a submodule in the folder. To change the version of the library:

cd lvgl_port_linux
git checkout <branch_name_or_commit_hash>

The file main.c is the default application provided and is configured to run the benchmark demo provided by LVGL library.

The main steps to create your own application are:

  • Modify main.c
  • Add any folders and files to extend the functionalities
  • Update Dockerfile to add any package
  • Modify CMakeLists.txt provided file to ensure all the required files are compiled and linked
  • Use the docker scripts provided to build the application for ARM64 architecture.

TroubleShooting

Output folder permissions

If there is any problem with the output folder generated permissions, modify the permissions:

sudo chown -R $(whoami):$(whoami) lvgl_port_linux/bin

Fbdev example runtime error

This error can be printed when running the application:

[Warn]	(1382.767, +37)	 lv_display_refr_timer: No draw buffer lv_refr.c:374
[Warn]	(1382.804, +37)	 lv_display_refr_timer: No draw buffer lv_refr.c:374
[Warn]	(1382.841, +37)	 lv_display_refr_timer: No draw buffer lv_refr.c:374
[Warn]	(1382.878, +37)	 lv_display_refr_timer: No draw buffer lv_refr.c:374

To fix the issue find the existing fbdev available:

ls /dev/fb*

Export the variable to match the fbdev name:

export LV_LINUX_FBDEV_DEVICE=/dev/fb0

Wayland example runtime error

While running the application, if there is an error about XDG_RUNTIME_DIR, add the following environment variable on the board.

export XDG_RUNTIME_DIR=/run/user/1000

Changing configuration causes errors building the application

CMake may have troubles with CMakeLists.txt changes with some variables setup. If there is any problem building, try to clean the build folder:

rm -rf lv_port_linux/build-arm64

Contribution and Support

If you find any issues with the development board feel free to open an Issue in this repository. For LVGL related issues (features, bugs, etc) please use the main lvgl repository.

If you found a bug and found a solution too please send a Pull request. If you are new to Pull requests refer to Our Guide to learn the basics.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages