pre-commitESP-BSP: Espressif's Board Support Packages
HOW TO USEBOARDSEXAMPLESCONTRIBUTINGLVGL portLCD driversReleases
This repository provides Board Support Packages (BSPs) for various Espressif and M5Stack development boards. Written in C, each BSP offers a unified and consistent API to simplify the initialization and use of common onboard peripherals such as displays, touch panels, audio codecs, SD cards, and selected sensors. The goal is to streamline development and reduce hardware-specific boilerplate, enabling faster prototyping and cleaner application code.Main Purpose of BSP
Simplify development on Espressif and M5Stack boards by providing ready-to-use peripheral initialization.
Enable quick project startup on supported development boards, with an easy path to migrate to custom hardware.
Facilitate cross-board development by offering a common API, making it easier to build and maintain projects for multiple boards.Supported IDF versions
The following table shows the compatibility of this BSP with different ESP-IDF versions:
4.x5.05.15.25.35.45.56.0
Supported Boards
Board nameSoCSupported FeaturesPhoto
ESP-BOX-3esp32s3 Audio Audio Microphone (es7210) Audio Speaker (es8311) Button LCD Display (st7789, ili9341) Temperature and Humidity IMU uSD Card Display Touch (tt21100, gt911)
ESP32-C3-LCDKitesp32c3 Audio Audio Speaker LCD Display (gc9a01) Knob LED
ESP32-LyraTesp32 Audio Audio Microphone (es8388) Audio Speaker (es8388) Button LED uSD Card
ESP32-P4-EYEesp32p4 Audio Audio Microphone Battery Button Camera (OV2710) LCD Display (st7789) Knob LED uSD Card
ESP32-P4 Function EV Boardesp32p4 Audio Audio Microphone (es8311) Audio Speaker (es8311) Camera (OV5647, SC2336) LCD Display (ek79007, ili9881c, lt8912b) uSD Card Display Touch (gt911)
ESP32-S3-EYEesp32s3 Audio Audio Microphone Button Camera (OV2640) LCD Display (st7789) LED uSD Card
ESP32-S3-KORVO-1esp32s3 Audio Audio Microphone (es7210) Audio Speaker (es8311) Button LED uSD Card
ESP32-S3-Korvo-2esp32s3 Audio Audio Microphone (es7210) Audio Speaker (es8311) Battery Button Camera (OV3660) LCD Display (ili9341) LED uSD Card Display Touch (gt911, tt21100)
ESP32-S3-LCD-EV-Boardesp32s3 Audio Audio Microphone (es7210) Audio Speaker (es8311) Button LCD Display Display Touch
ESP32-S3-USB-OTGesp32s3 Battery Button LCD Display (st7789) LED uSD Card
DevKit BSP- Button LED
Generic BSP- Button LCD Display (st7789, ili9341, gc9a01) LED Display Touch (tt21100, gt1151, gt911, cst816s, ft5x06)
ESP-VoCatesp32s3 Audio Audio Microphone (es7210) Audio Speaker (es8311) Button LCD Display (st77916) LED uSD Card Display Touch (cst816s)
ESP-WROVER-KITesp32 Button LCD Display (st7789) LED uSD Card
M5 Atom S3esp32s3 Button LCD Display (gc9a01)
M5Dialesp32s3 Button LCD Display (gc9a01) Knob Display Touch (ft5x06)
M5Stack Coreesp32 Audio Speaker Button LCD Display (ili9341) uSD Card
M5Stack Core2esp32 Audio Audio Speaker LCD Display (ili9341) uSD Card Display Touch (ft5x06)
M5Stack CoreS3esp32s3 Audio Audio Microphone (es7210) Audio Speaker (aw88298) Camera (GC0308) LCD Display (ili9341) IMU uSD Card Display Touch (ft5x06)
M5Stack Tab5esp32p4 Audio Audio Microphone (es7210) Audio Speaker (es8388) Camera (SC202CS) LCD Display (ili9881c, st7123) IMU uSD Card Display Touch (gt911, st7123)
Deprecated Boards
Board nameSoCSupported FeaturesPhoto
ESP-BOXesp32s3 Audio Audio Microphone (es7210) Audio Speaker (es8311) Button LCD Display (st7789) IMU Display Touch (tt21100)
ESP-BOX-Liteesp32s3 Audio Audio Microphone (es7243e) Audio Speaker (es8156) Button LCD Display (st7789)
ESP32-Azure IoT Kitesp32 Button LCD Display (ssd1306) IMU LED uSD Card SENSOR_HUMIDITY SENSOR_LIGHT SENSOR_MAG SENSOR_PRESSURE SENSOR_TEMPERATURE
ESP32-S2-Kaluga Kitesp32s2 Audio Audio Microphone (es8311) Audio Speaker (es8311) Button Camera LCD Display (st7789) LED
Examples
The best way to start with ESP-BSP is by trying one of the available examples on your board.
Each example includes a README.md file listing supported boards and usage instructions.
Here is a summary of the available examples:
ExampleDescriptionSupported BoardsTry with ESP Launchpad
Audio ExamplePlay and record WAV file4 boardsesp32_lyratesp32_s2_kaluga_kitesp32_s3_korvo_1esp32_s3_korvo_2Flash Example
Display ExampleShow an image on the screen with a simple startup animation (LVGL)19 boardsesp-boxesp-box-3esp-box-liteesp32_c3_lcdkitesp32_p4_eyeesp32_p4_function_ev_boardesp32_s2_kaluga_kitesp32_s3_eyeesp32_s3_korvo_2esp32_s3_lcd_ev_boardesp32_s3_usb_otgesp_vocatesp_wrover_kitm5_atom_s3m5dialm5stack_corem5stack_core_2m5stack_core_s3m5stack_tab5Flash Example
Display, Audio and Photo ExampleComplex demo: browse files from filesystem and play/display JPEG, WAV, or TXT files (LVGL)9 boardsesp-boxesp-box-3esp-box-liteesp32_s3_korvo_2esp32_s3_lcd_ev_boardesp_vocatm5stack_core_2m5stack_core_s3m5stack_tab5Flash Example
Camera ExampleStream camera output to display (LVGL)6 boardsesp32_p4_eyeesp32_p4_function_ev_boardesp32_s3_eyeesp32_s3_korvo_2m5stack_core_s3m5stack_tab5Flash Example
LVGL Benchmark ExampleRun LVGL benchmark tests10 boardsesp-boxesp-box-3esp-box-liteesp32_p4_function_ev_boardesp32_s2_kaluga_kitesp32_s3_eyeesp32_s3_korvo_2esp32_s3_lcd_ev_boardm5dialm5stack_core_s3-
LVGL Demos ExampleRun the LVGL demo player - all LVGL examples are included (LVGL)12 boardsesp-boxesp-box-3esp-box-liteesp32_p4_function_ev_boardesp32_s2_kaluga_kitesp32_s3_eyeesp32_s3_korvo_2esp32_s3_lcd_ev_boardesp_vocatm5dialm5stack_core_s3m5stack_tab5Flash Example
Display Rotation ExampleRotate screen using buttons or an accelerometer (BSP_CAPS_IMU, if available)10 boardsesp-boxesp-box-3esp-box-liteesp32_p4_eyeesp32_p4_function_ev_boardesp32_s3_korvo_2esp32_s3_lcd_ev_boardesp_vocatm5dialm5stack_coreFlash Example
Display SD card ExampleExample of mounting an SD card using SD-MMC/SPI with display interaction. This example is also supported on boards without a display.6 boardsesp-box-3esp32_p4_function_ev_boardesp32_s3_korvo_2esp_vocatm5stack_core_s3m5stack_tab5Flash Example
Sensors ExampleAcquire sensor data using the sensor hub component3 boardsesp-box-3m5stack_core_s3m5stack_tab5Flash Example
USB HID ExampleUSB HID demo (keyboard, mouse, or gamepad visualization using LVGL)3 boardsesp32_p4_function_ev_boardesp32_s3_usb_otgm5stack_tab5-
Generic Button and LED ExampleMinimal example using the Generic BSP: button and LED control2 boardsesp_bsp_devkitesp_bsp_generic-
MQTT ExampleCollect sensor data and publish to an MQTT server1 boardesp32_azure_iot_kit-
BSP headers and options
bsp/name-of-the-bsp.h: Main include file of the BSP with public API
bsp/esp-bsp.h: Convenience include file with the same name for all BPSs
bsp/display.h and bsp/touch.h: Only for BSPs with LCD or touch controller. Contain low level initialization functions for usage without LVGL graphical library
By default, BSPs with display are shipped with LVGL, if you are interested in BSP without LVGL you can use BSP versions with noglib suffix (eg. esp32_s3_eye_noglib).
NOTE: There can be only one BSP in a single esp-idf project.In a custom project
Packages from this repository are uploaded to the IDF component registry.
You can add them to your project via idf.py add-dependency, e.g. idf.py add-dependency esp_wrover_kit==1.0.0
Recommendation for custom projects
When you want to use a BSP in a real project, it is highly recommended to disable configuration option CONFIG_BSP_ERROR_CHECK in menuconfig. You should check all returned error codes from all BSP functions you call. Otherwise, if the option CONFIG_BSP_ERROR_CHECK is enabled, any error encountered in a BSP will abort the program.Compiling project for multiple BSPs
Experimental feature: This feature is under development!
A single project can be run on multiple different development boards, if the boards contain the features required by the project (such as audio, display, camera...).
For this purpose, idf.py is extended by examples/bsp_ext.py which allows you to build an example for your specific BSP. Example command for display e.g.:idf.py -D SDKCONFIG_DEFAULTS=sdkconfig.bsp.esp_wrover_kit build
In case you want to build locally for multiple boards at the same time, it is useful to have separate build directories for each BSP configuration.
In order to achieve this, you can extend the above command like this:idf.py -B build/wrover_kit -D SDKCONFIG_DEFAULTS=sdkconfig.bsp.esp_wrover_kit build
Note: This feature is not yet integrated to idf.py by default. If you want to use it, you must set your environmental variable IDF_EXTRA_ACTIONS_PATH to path to esp-bsp/examples/bsp_ext.py.Copyrights and License
All original source code in this repository is Copyright (c) Espressif Systems (Shanghai) Co. Ltd., and is licensed under the Apache 2.0 license.