摘要:最近在做一个项目需要在esp32上用到LVGL,为记录移植过程,写下这篇帖子。
参考文档:lv_port_esp32/README.md at master · lvgl/lv_port_esp32 (github.com)
首先需要在工程目录文件夹下面新建一个components
文件夹,进入到components文件夹下面,使用git init新建一个git仓库,然后使用git submodule add https://github.com/lvgl/lvgl.git ./lvgl拉取LVGL源代码。
mkdir components
cd components
git submodule add https://github.com/lvgl/lvgl.git ./lvgl
到这里如果不报错其实LVGL已经移植成功了,可以在idf中使用idf.py menuconfig命令对LVGL进行细致的配置(用lv_conf.h好像也可以,LVGL提供了一个lv_conf.template.h,可以复制下来改名试一下)
idf.py menuconfig
menuconfig的界面
LVGL在component config下面的LVGL configuration