Light and Versatile Graphics Library (VLGL ) with STM32

 

   LVGL (Light and Versatile Graphics Library) is a free and open-source graphics library providing everything you need to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and a low memory footprint. He whole library is developed in pure c language and easy to port. The main features of littleVGL are as follows:

  •  Has a very rich built-in controls, such as buttons, charts, lists, sliders, images, etc.

  • Advanced graphic effects: animation, anti-aliasing, transparency, smooth scrolling

  • Supports multiple input devices, such as touchpad, mouse , keyboard, encoder, etc

  • Fully customizable graphic elements

  • Support multi-language UTF-8 encoding

  • Support multiple and multiple display devices, such as simultaneous display on multiple color screens or monochrome screens

  • The hardware is independent of any micro Controller or display

  • Can be reduced to the smallest memory (64 kB Flash, 16 kB RAM)

  • Support operating system, external storage and GPU (not required)

  • Only a single frame buffer device can present advanced visual effects

  • Use C to write Maximum compatibility (C++ compatible)

  •  Support PC simulator


Requirements

  • 16, 32 or 64 bit microcontroller or processor
  • > 16 MHz clock speed is recommended
  • Flash/ROM: > 64 kB for the very essential components (> 180 kB is recommended)
  • C99 or newer compiler

All repositories of the LVGL project are hosted on GitHub: https://github.com/lvgl


 LVGL ported to STM32F103

  First you can download LVGL library porting from this link  Dowanload.  and LVGL_DEMO  also download from this link. 
 
First open LVGL folder and select and copy file and folder from there. Create new Folder VLGL for that paste it.



Now Change lv_conf_template.h to lv_conf.h

Next Step is Open lv_config.h Change the first line #if 0 to #if 1, to enable lv_conf.h.

 lv_conf.h File Change

Next Step is 
Open the lvgl/examples/porting folder, which contains data that interacts with the hardware layer.

 lvgl/examples/porting folder,

Remove all _templates in the 8 files, and change #if 0 to #if 1 in everyfile. 
Remove _TEMP from All files  the macro definition. 
just like to Change the macro definition in file lv_port_disp.c :

 #include "lv_port_disp_templ.h" to change as "lv_port_disp.h" 

same this for  other C Files in fs and indevs are also modified accordingly. 
fs is related to the file system

indev is related to input devices, buttons, touch screens, mice, etc.


Now make some change in lv_config.h file as shown below

modify lv_config.h File



Example

Here  we create project of STM32F103RGT which have Flas Memory 1096 kb and RAM as 96 kb with basic setting




Next Step is to create folder VLGL and VLGL_Port folders in project . as show in below pic.



Now add VLGL folder source and example folder in it. and VLGL_Port have poring  files as shown below pics.











0 comments:

Post a Comment