hunting/external/lvgl_simulator/README.md
2024-06-15 08:30:24 +08:00

33 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 1. lvgl开源库PC模拟器
## 1.1. 官方git仓库
```
git clone --recursive https://github.com/lvgl/lv_sim_vscode_sdl
```
项目把官方开源代码上传到gitee方便自主管理。
## 1.2. 开发环境
安装Linux支持环境SDL未安装可能会提示找不到“SDL”相关资源
```
sudo apt-get update
sudo apt-get install -y build-essential libsdl2-dev
```
## 1.3. 修改内容
1. 自研模块自动关联开源库并使用CMakeList.txt编译
## 1.4. 更新
1.更新了lvgl源码版本8.3.9覆盖lv_sim_vscode_sdl/lvgl
2.修改./lv_sim_vscode_sdl/lv_conf.h增加下述代码
```
// ================== Added by fancy code ================== start
/*BMP decoder library*/
#define LV_USE_BMP 1 // Use bmp picture.
/*API for open, read, etc*/
#define LV_USE_FS_POSIX 1
#if LV_USE_FS_POSIX
#define LV_FS_POSIX_LETTER 'A' /*Set an upper cased letter on which the drive will accessible (e.g. 'A')*/
#define LV_FS_POSIX_PATH "" /*Set the working directory. File/directory paths will be appended to it.*/
#define LV_FS_POSIX_CACHE_SIZE 0 /*>0 to cache this number of bytes in lv_fs_read()*/
#endif
// ================== Added by fancy code ================== finish
```
3.删掉模拟器的example代码