A simple arrangement of the lvgl simulator on windows of LVGL based on the Visual Studio construction method

A simple arrangement of the lvgl simulator on windows of LVGL based on the Visual Studio construction method

Table of contents

A simple arrangement of the lvgl simulator on windows of LVGL based on the Visual Studio construction method

1. Brief introduction

Two, visual studio installation

 3. Build the lvgl simulator project

Method 1: git clone download project

Method 2: git directly downloads the compressed package


1. Brief introduction

Use of LVGL's PC emulator. On the one hand, the advantage of the PC simulator is that we can learn lvgl without actual hardware, and on the other hand, we can greatly reduce the number of burning codes when we actually design the GUI interface. We can design it on the PC simulator first, and then move the code to the embedded project, compile and burn it into the board.

Introduction to lvgl emulator

The lvgl emulator can run on different operating systems with different IDE software, such as Windows, Linux or OSX. The following are the types of IDE software supported by littleVGL:

LVGL (Light and Versatile Graphics Library) is a lightweight general-purpose graphics library , which is a free and open-source graphics library that provides everything needed to create embedded GUIs, with easy-to-use components, beautiful visual effects and low memory footprint, etc. features. Support touch screen operation, easy and convenient porting, developers have been constantly improving and updating.

Features:

  • Rich and powerful modular graphic components : buttons, charts, lists, sliders, images, etc.
  • Advanced graphics engine: animation, anti-aliasing, transparency, smooth scrolling, layer blending and other effects
  • Support a variety of input devices : touch screen, keyboard, encoder, keys, etc.
  • Support for multiple display devices
  • Does not depend on a specific hardware platform and can run on any display
  • Configuration can be trimmed (minimum resource usage: 64 kB Flash, 16 kB RAM)
  • Multilingual support based on UTF-8, such as Chinese, Japanese, Korean, Arabic, etc.
  • Graphical interfaces can be designed and laid out in a CSS-like manner (for example: Flexbox , Grid )
  • Support operating system, external memory, and hardware acceleration (LVGL has built-in support for STM32 DMA2D, NXP PXP, and VGLite)
  • Even with only a single frame buffer , rendering is guaranteed to be silky smooth
  • All are written in C and support C++ calls
  • Support Micropython programming, see: LVGL API in Micropython
  • Support simulator simulation, can develop without hardware support
  • Rich and detailed routines
  • Detailed documentation and API reference manual, available online or downloaded in PDF format

Hardware requirements to run:

Related learning website:

This case is based on the environment:

1、windows 10

2、visual studio 2019

3、lvgl 8.3.0

Two, visual studio installation

1. Download and install visual studio from the official website

Download Visual Studio Tools - Free Install for Windows, Mac, Linux

2. Download visual studio and install it, then open the installer and confirm the installation of the C++ environment

 3. Build the lvgl simulator project

There are two ways to build here:

1. git clone download project

2. Git directly downloads the compressed package

Method 1: git clone download project

The git environment has been installed by default

1) git get clone address: https://github.com/lvgl/lv_port_win_visual_studio.git

Domestic mirror address: mirrors / lvgl / lv_port_win_visual_studio · GitCode

 2) Right click in the folder to be downloaded and open Git Bash

 3) Use git clone to download the project

Because the lvgl simulator contains subprojects, use git clone --recursive or git clone --recurse-submodules to recursively download

Command: git clone --recursive https://github.com/lvgl/lv_port_win_visual_studio.git

 4) OpenSSL SSL_read: Connection was reset, errno 10054 may be encountered

Use git config --global http.sslVerify "false" to remove SSL authentication, and then repeat the previous command to download

5) After the download is complete, you will find that the subdirectories "freetype", "lv_drivers", "lvgl" are empty

Note: some errors in clone can be ignored first

 

6) Enter the root directory of the code and use git to download the submodule

Command: cd xxx folder; git submodule update --init --recursive

 7) The subdirectories "freetype", "lv_drivers", and "lvgl" have corresponding codes

 8) Enter the code project root directory: lv_port_win_visual_studio, double-click LVGL.Simulator.sln to open the project

 9) The project opens as shown in the figure

 10) Switch platform, switch to x64 here

 11) Click "Local Windows Debugger" to run the project

12) The running effect is as shown in the figure

Method 2: git directly downloads the compressed package

1) Download the lvgl emulator compressed package on the official website

Download address: GitHub - lvgl/lv_port_win_visual_studio: LVGL Windows Simulator Visual Studio Edition

2) Unzip the project, download the subdirectory "freetype", "lv_drivers", "lvgl" sub-module code

3) Open lv_port_win_visual_studio, double-click LVGL.Simulator.sln to open the project

 4) The project opens as shown in the figure

 5) Switch platform, switch to x64 here

6) Click "Local Windows Debugger" to run the project

7) The running effect is as shown in the figure

Guess you like

Origin blog.csdn.net/u014361280/article/details/127732554