Setting up LVGL in STM32CubeIDE

Hi Folks,

I’m new to the LVGL world. I tried to use STM’s TouchGFX but it’s way too complicated plus it’s written in C++ and I’d like to stay in the C universe. The STM32 page (STM32 — LVGL documentation) isn’t the most beginner friendly help page. I’m working on the STM32F769I-Disco board.

I understand the first two lines of the help screen:

  • Create or open a project in STM32CubeIDE. <— Did this
  • Copy the entire LVGL folder to [project_folder]/Drivers/lvgl. ← Did this

I downloaded the LVGL-master files from Github.

I copied the whole LVGL-master directory to the Project/Drivers/LVGL directory.

I added the following two lines to the include paths:

But when I try and compile an initial project I get the following error:

…/Drivers/LVGL/widgets/win/lv_win.h:16:10: fatal error: …/…/…/lvgl.h: No such file or directory

What do I need to do to fix this?
Is there a simple Hello World example using the STM32CubeIDE out there somewhere?


Seems you do somthink diffrent. Primary unpacked lvgl have example doc src and not core under LVGL dir.
Secondary where and how you do

instructions for Porting your project to create the lv_conf.h file


I’m still clueless on how I’m supposed to set up the project in STM32CubeIDE.

First, am I supposed to use version 9.0 or 8.3? When I click on the “download” link on the “Get the library” it defaults to the dev level 9.0. Is this stable enough to use even for a beginner like me?

All I want to do is manage a “Hello World” type of example.

This is what I found on the examples page:

#include “…/lv_examples.h”


  • Basic example to create a “Hello world” label
    void lv_example_get_started_1(void)
    /Change the active screen’s background color/
    lv_obj_set_style_bg_color(lv_scr_act(), lv_color_hex(0x003a57), LV_PART_MAIN);

    /Create a white label, set its text and align it to the center/
    lv_obj_t * label = lv_label_create(lv_scr_act());
    lv_label_set_text(label, “Hello world”);
    lv_obj_set_style_text_color(lv_scr_act(), lv_color_hex(0xffffff), LV_PART_MAIN);
    lv_obj_align(label, LV_ALIGN_CENTER, 0, 0);


What files or directories do I need in my project to run this example?


You can have a look at the following repository.
xpress-embedo/STM32F7 (

This repository also uses the STM32F769I-DISCO board and has examples for STM32CubeIDE and IAR Compilers.
Here LVGL is added as a submodule, inside the ThirdParty folder, and you can still use CubeMX to generate the code related to other peripherals.

The Orange Highlighted folders contain the CubeIDE Project.
The following video demonstrates the LVGL_Sample2 project.

STM32F769I DISCO TFT Based Project Based on LVGL Graphics Library - YouTube

Some explanation is given on this page.
LVGL with STM32F4 and STM32F7 - Embedded Laboratory