{"id":13575072,"url":"https://github.com/lvgl/lv_port_esp32","last_synced_at":"2025-05-15T21:04:23.859Z","repository":{"id":37469853,"uuid":"165520544","full_name":"lvgl/lv_port_esp32","owner":"lvgl","description":"LVGL ported to ESP32 including various display and touchpad drivers","archived":false,"fork":false,"pushed_at":"2023-03-21T03:15:01.000Z","size":18823,"stargazers_count":1150,"open_issues_count":34,"forks_count":450,"subscribers_count":43,"default_branch":"master","last_synced_at":"2025-05-08T21:19:15.421Z","etag":null,"topics":["esp-idf","esp32","graphics","lvgl","ui"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lvgl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-01-13T15:19:21.000Z","updated_at":"2025-05-07T17:44:14.000Z","dependencies_parsed_at":"2023-02-12T16:31:42.147Z","dependency_job_id":"bd176464-1a6c-4e9a-8f16-64b18d6ef27c","html_url":"https://github.com/lvgl/lv_port_esp32","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvgl%2Flv_port_esp32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvgl%2Flv_port_esp32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvgl%2Flv_port_esp32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lvgl%2Flv_port_esp32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lvgl","download_url":"https://codeload.github.com/lvgl/lv_port_esp32/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254422754,"owners_count":22068678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["esp-idf","esp32","graphics","lvgl","ui"],"created_at":"2024-08-01T15:00:57.997Z","updated_at":"2025-05-15T21:04:23.806Z","avatar_url":"https://github.com/lvgl.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"# LVGL project for ESP32\n\nThis is an ESP32 demo project showcasing LVGL v7 with support for several display controllers and touch controllers.\nThe demo application is the `lv_demo_widgets` project from the [lv_examples](https://github.com/lvgl/lv_examples) repository.\n\n- Version of ESP-IDF required 4.2. NOTE: We're trying to make this repo backwards compatible, usage of idf.py is encouraged.\n- Version of LVGL used: 7.9.\n- Version of lv_examples used: 7.9.\n\n#### Table of content\n- [Get started](#get-started)\n- [Use LVGL in your ESP-IDF project](#use-lvgl-in-your-esp-idf-project)\n- [Use lvgl_esp32_drivers in your project](#use-lvgl_esp32_drivers-in-your-project)\n- [Platformio support](#platformio-support)\n- [ESP32-S2 Support](#esp32-s2-support)\n\nExample demo for TFT displays:\n\n![Example GUI_DEMO with ESP32 using LVGL](images/new_photo.jpg)\n\nMonochrome support:\n\n![Example_monochrome demo with ESP32 using LVGL](images/new_mono.jpg)\n\n## Display and touch controllers\n\nThe display and touch (indev) controllers are now into it's own repository, you can find it [here](https://github.com/lvgl/lvgl_esp32_drivers).\nTo report any issue or add new display or touch (indev) drivers you can do so in the `lvgl_esp32_drivers` repo.\n\n## Get started\n\n### Prerequisites\n\n- ESP-IDF Framework.\n\n### Note\n\nThis project tries to be compatible with both the ESP-IDF v3.x and v4.0, but using v4.0 is recommended.\nInstructions assume you are using the v4.x toolchain, otherwise use the make commands, e.g. instead of running `idf.py menuconfig`, run `make menuconfig`.\n\n### Build and run the demo.\n\n1. Clone this project by `git clone --recurse-submodules https://github.com/lvgl/lv_port_esp32.git`, this will pull this repo and its submodules.\n\n2. Get into the created `lv_port_esp32` directory.\n\n3. Run `idf.py menuconfig`\n\n4. Configure LVGL in `Components config-\u003eLVGL Configuration`. For monochrome displays use the mono theme and we suggest enabling the `unscii 8` font.\n\n5. Configure your display and/or touch controllers in `Components config-\u003eLVGL TFT Display Configuration` and `Components config-\u003eLVGL TOUCH Configuration`.\n\n6. Store your project configuration.\n\n7. Build the project with `idf.py build`\n\n8. If the build don't throw any errors, flash the demo with `idf.py -p (YOUR SERIAL PORT) flash` (with `make` this is just `make flash` - in 3.x PORT is configured in `menuconfig`)\n\n## Use LVGL in your ESP-IDF project\n\nLVGL now includes a Kconfig file which is used to configure most of the LVGL configuration options via menuconfig, so it's not necessary to use a custom `lv_conf.h` file.\n\nIt is recommended to add LVGL as a submodule in your IDF project's git repo.\n\nFrom your project's root directory:\n1. Create a directory named `components` (if you don't have one already) with `mkdir -p components`.\n2. Clone the lvgl repository inside the `components` directory with `git submodule add https://github.com/lvgl/lvgl.git components/lvgl`\n3. Run `idf.py menuconfig`, go to `Component config` then `LVGL configuration` to configure LVGL.\n\n## Use lvgl_esp32_drivers in your project\n\nIt is recommended to add [lvgl_esp32_drivers](https://github.com/lvgl/lvgl_esp32_drivers) as a submodule in your IDF project's git repo.\n\nFrom your project's root directory:\n1. Create a directory named `components` (if you don't have one already) with `mkdir -p components`.\n2. Clone the lvgl_esp32_drivers repository inside the `components` directory with `git submodule add https://github.com/lvgl/lvgl_esp32_drivers.git components/lvgl_esp32_drivers`\n3. Run `idf.py menuconfig`, go to `Component config` then `LVGL TFT configuration` and `LVGL TFT Display configuration` to configure lvgl_esp32_drivers.\n\n## Platformio support\n\nUsing the [lv_platformio](https://github.com/lvgl/lv_platformio) project add the following lines to `platformio.ini` file:\n\n```\n[env:esp32]\nplatform = espressif32\nframework = espidf\nboard = esp-wrover-kit\n```\n\nChange the default environment to `default_envs = esp32`.\n\nModify the `main.c` like this:\n\n```c\n#include \"lvgl.h\"\n\n// #include \"driver.h\"\n\n#include \"demo.h\"\n\nint app_main(void)\n{\n    lv_init();\n\n    /* Initialize your hardware. */\n    \n    /* hw_init(); */\n\n    demo_create();\n\n    /* Create the UI or start a task for it.\n     * In the end, don't forget to call `lv_task_handler` in a loop. */\n\n    /* hw_loop(); */\n\n    return 0;\n}\n```\n\nFor more information see: [platformio with espidf framework compability](https://github.com/lvgl/lv_port_esp32/issues/168).\n\n# ESP32-S2 Support\n\nSupport for ESP32-S2 variant is Work In Progress.\nSmaller displays (e.g. 320x240) work fine, but larger ones need testing.\n\n## Background\n\nESP32-S2 has less on-chip SRAM than its predecessor ESP32 (520kB vs. 320kB).\nThis causes problems with memory allocation with large LVGL display buffers as they don't fit into the on-chip memory\nand external PSRAM is not accessible by DMA.\n\nMoreover, static allocation to external PSRAM is not yet supported\n(see [GitHub issue](https://github.com/espressif/esp-idf/issues/6162)).\n\nAt this momement, the buffers are dynamicaly allocated with DMA capabilty and memory allocator handles the rest.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flvgl%2Flv_port_esp32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flvgl%2Flv_port_esp32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flvgl%2Flv_port_esp32/lists"}