Try out LVGL Pro - A complete toolkit to build, test, share, and ship UIs efficiently!
LVGL
Showcase

STM32F429 Discovery Board: LVGL Port and Demo

Step-by-step guide to porting LVGL to the STM32F429 Discovery board with a 2.4-inch TFT display and resistive touchpad.

Gabor Kiss-VamosiGabor Kiss-Vamosi4 min read

In this post I'll show you how I ported the Littlev Graphics Library (now LVGL) to an STM32F429 Discovery board. The porting was quite simple because the GUI library needs only a few interface functions. Although I'd never used STM32 microcontrollers before, the whole process took only half a day.

LVGL Demo on STM32F429 Discovery Board

Ready-to-Use Project#

You can download a ready-to-use project from GitHub: stm32f429_disco_no_os_sw4stm32

To clone with git:

git clone https://github.com/littlevgl/stm32f429_disco_no_os_sw4stm32.git --recurse-submodules
bash

Or download the project as a zip file.

The Development Board#

STM32F429 Discovery development board with 2.4-inch TFT display
STM32F429 Discovery development board with 2.4-inch TFT display
STM32F429I Discovery
MCUSTM32F429ZIT6 (ARM Cortex-M4)
Flash2 MB
RAM256 KB
Display2.4 inch 320x240 QVGA TFT LCD
TouchResistive touchpad
External RAM64 Mbit SDRAM
Peripherals
USB debugging and programmingLTDC (LCD TFT Display Controller)Chrom-ART graphics accelerator (DMA2D)

Key features:

  • Powerful STM32F429ZIT6 microcontroller with ARM Cortex-M4 core
  • 2 MB Flash memory and 256 KB internal RAM
  • 320×240, 2.4-inch QVGA TFT LCD with resistive touch pad
  • 64 Mbit SDRAM (not required - internal RAM is sufficient for one frame buffer)
  • LVGL doesn't require double buffering for high-level features like transparency, scrolling, or animations
  • USB interface for firmware loading and debugging

Setting Up a New Project#

If you're not using the ready-to-use project, here's how to set up a new project from scratch.

Development Environment#

I started by searching for code examples and quickly found STM32CubeF4, ST's portable embedded software library that comes with many examples.

For an Eclipse-based IDE, I used SW4STM32. You'll need to register at openstm32.org to download the IDE. Installation was straightforward on Linux Mint, and the IDE is cross-platform (works on Windows and macOS as well).

Creating the Project#

I reviewed some display-related examples from the STM32CubeF4 pack. In this MCU, the LCD controller module is called LTDC (LCD TFT Display Controller), and it features a graphics accelerator called Chrom-ART (also known as DMA2D).

To create a new project:

  1. Go to File → New → C Project
  2. Choose Empty project with Ac6 STM32 MCU GCC toolchain
  3. Select your board type (STM32F429I-Discovery)
  4. Enable Cube HAL
  5. Click "Download target firmware" if the button is active
STM32 new project - select toolchain
Select toolchain in SW4STM32
STM32 new project - select board
Select your board type
STM32 new project - select HAL drivers
Enable Cube HAL drivers

The result is a project with many folders and files. I was able to build this initial project without any warnings or errors.

Testing the Setup#

To test the development board, I wrote a simple LED blinker in the main function:

int main(void) {
    HAL_Init();
    BSP_LED_Init(LED3);
 
    while(1) {
        BSP_LED_Toggle(LED3);
        HAL_Delay(300);
    }
}
c

Porting LVGL#

Adding the LVGL Repository#

Using a terminal, I cloned the lvgl repository from LVGL's GitHub page. From the project's root folder:

git clone https://github.com/littlevgl/lvgl.git
bash

To add the new directory, right-click on the project name in Eclipse and choose Refresh.

Configuration#

  1. Copy lvgl/lv_conf_templ.h next to the lvgl folder
  2. Rename it to lv_conf.h
  3. Remove the #if 0 at the beginning and its #endif at the end to enable the content

In lv_conf.h, I changed only:

LV_HOR_RES  240
LV_VER_RES  320
c

Driver Implementation#

I created the drivers according to the example programs:

  1. Created hal_stm_lvgl folder
  2. Wrote display driver in tft.c
  3. Wrote touch pad driver in touchpad.c
  4. Added lv_tick_inc(1) to src/stm32f4xx_it.c → SysTick_Handler()

In main.c, I called:

  • lv_init()
  • tft_init()
  • touchpad_init()

The project compiled successfully and loaded to the board.

Running the Demo#

Finally, I added the lv_examples repository and called demo_create(). This created the GUI shown in the video above.

Summary#

The STM32F429 Discovery board is a great, powerful, and low-cost development board that serves as an excellent starting point for your first GUI application. With LVGL, you can create modern and innovative graphical user interfaces. By following this guide, you can easily get through the first steps of your embedded GUI journey!

About the author

Gabor Kiss-Vamosi
Gabor Kiss-Vamosi

CEO & Creator of LVGL

Founder and lead developer of LVGL, the open-source embedded graphics library used in millions of devices worldwide.

Meet the people behind the blog

Discover the talented writers sharing their knowledge about LVGL

View Authors

Subscribe to our newsletter to not miss any news about LVGL. We will send maximum of 2 mails per month.

LVGL

LVGL is the most popular free and open source embedded graphics library targeting any MCU, MPU and display type to build beautiful UIs.

We also do services like UI design, implementation and consulting.

© 2026 LVGL. All rights reserved.
YouTubeGitHubLinkedIn