[LVGL]:MACOS下使用LVGL模拟器

如何在MACOS下使用lvgl模拟器

1.安装必要环境

shell 复制代码
brew install sdl2

查看sdl2安装位置:

shell 复制代码
(base) ➜  ~ brew list sdl2
/opt/homebrew/Cellar/sdl2/2.30.1/bin/sdl2-config
/opt/homebrew/Cellar/sdl2/2.30.1/include/SDL2/ (78 files)
/opt/homebrew/Cellar/sdl2/2.30.1/lib/libSDL2-2.0.0.dylib
/opt/homebrew/Cellar/sdl2/2.30.1/lib/cmake/ (2 files)
/opt/homebrew/Cellar/sdl2/2.30.1/lib/pkgconfig/sdl2.pc
/opt/homebrew/Cellar/sdl2/2.30.1/lib/ (4 other files)
/opt/homebrew/Cellar/sdl2/2.30.1/share/aclocal/sdl2.m4
(base) ➜  ~ 

2.模拟器配置

2.1 克隆仓库

仓库地址为:https://github.com/lvgl/lv_port_pc_vscode

shell 复制代码
git clone --recursive https://github.com/lvgl/lv_port_pc_vscode

2.2 修改makefile

打开根目录下的Makefile:

将lv_driver修改为sdl2

makefile 复制代码
#LV_DRIVER          := X11
LV_DRIVER          := SDL2

修改INC和LDIBS,链接SDL2

复制代码
INC 				:= -I./ui/simulator/inc/ -I./ -I./lvgl/ -I/opt/homebrew/Cellar/sdl2/2.30.1/include
LDLIBS	 			:= -lm -L /opt/homebrew/Cellar/sdl2/2.30.1/lib -l SDL2


2.3编译与运行

shell 复制代码
(base) ➜  lv_port_pc_vscode git:(master) ✗ make -j12 && ./build/bin/demo
相关推荐
JNX_SEMI8 小时前
AT2401C 2.4GHz 全集成射频前端单芯片技术解析
前端·单片机·嵌入式硬件·物联网·硬件工程
电子工程师成长日记-C519 小时前
51单片机智能灯光控制系统
单片机·嵌入式硬件·51单片机
狂奔蜗牛(bradley)10 小时前
嵌入式软件编程思想之事件驱动+表驱动状态机+事件参数+优先级FIFO
单片机·mcu
secondyoung10 小时前
Cortex-R52学习:存储系统
arm开发·单片机·学习·arm
开发笔记-阿牛12 小时前
CK6159A 语音主控 USB 恒温热敷控制器硬件设计(原理图 + PCB + 温控安全方案)
单片机·嵌入式硬件
sramdram14 小时前
低功耗串口通信蓝牙模块应用原理
单片机·嵌入式硬件·蓝牙模块·通信蓝牙模块·串口蓝牙模块
__Rhaast丶15 小时前
set_data_check用法解析(一) lib库中的data check解析
单片机·嵌入式硬件
wuyk55516 小时前
21. 嵌入式面试避坑指南:sizeof 是关键字,不是函数!
c语言·开发语言·stm32·单片机·嵌入式硬件
FreakStudio12 天前
W55MH32L-EVB 上手测评:硬件 TCP/IP 加持的以太网单片机,MicroPython 零门槛开发
python·单片机·嵌入式·大学生·面向对象·并行计算·电子diy·电子计算机
✎ ﹏梦醒͜ღ҉繁华落℘18 天前
单片机基础知识---stm32单片机的优先级
stm32·单片机·mongodb