[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
相关推荐
ting_zh3 小时前
STM32F7系列MCU上电启动流程
stm32·单片机·嵌入式硬件
Tel199253080043 小时前
全新C-Components高压继电器P/N 500-214
单片机·物联网·自动化·工业自动化
五羟基己醛5 小时前
【嵌入式入门】STM32之封装自己的静态链接库(.lib文件)
stm32·单片机·嵌入式硬件
钿驰科技7 小时前
TC-BL2430无刷电机驱动板在多领域的应用
单片机·嵌入式硬件
boneStudent8 小时前
BLDC电机无感FOC控制代码实例分享
stm32·单片机·嵌入式硬件
悠哉悠哉愿意9 小时前
【嵌入式学习笔记】OLED 显示驱动 (SSD1306)
笔记·单片机·嵌入式硬件·学习
大神与小汪10 小时前
STM32WB55串口蓝牙模块
stm32·单片机·嵌入式硬件
蝎蟹居10 小时前
GBT 4706.1-2024逐句解读系列(25) 第7.5条款:不同电压功率需清晰明确
人工智能·单片机·嵌入式硬件·物联网·安全
独处东汉11 小时前
AI辅助Stm32l031项目开发调试板子之按键跟adc
stm32·单片机·嵌入式硬件
爱潜水的小L11 小时前
自学嵌入式day48,温度传感器
单片机·嵌入式硬件