[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
相关推荐
悠哉悠哉愿意11 天前
【单片机学习笔记】串口、超声波、NE555的同时使用
笔记·单片机·学习
Lester_110111 天前
STM32霍尔传感器输入口设置为复用功能输入口时,还能用GPIO函数直接读取IO的状态吗
stm32·单片机·嵌入式硬件·电机控制
三佛科技-1873661339711 天前
120W小体积碳化硅电源方案(LP8841SC极简方案12V10A/24V5A输出)
单片机·嵌入式硬件
z203483152011 天前
STM32F103系列单片机定时器介绍(二)
stm32·单片机·嵌入式硬件
Alaso_shuang11 天前
STM32 核心输入、输出模式
stm32·单片机·嵌入式硬件
2501_9181269111 天前
stm32死锁是怎么实现的
stm32·单片机·嵌入式硬件·学习·个人开发
z203483152011 天前
STM32F103系列单片机定时器介绍(一)
stm32·单片机
星马梦缘11 天前
驱动层开发——蜂鸣器驱动
stm32·单片机·嵌入式硬件·hal·驱动
小刘爱玩单片机11 天前
【stm32简单外设篇】- 测速传感器模块(光电)
c语言·stm32·单片机·嵌入式硬件
hateregiste11 天前
嵌入式软件开发中常见知识点问答集锦!
c语言·单片机·嵌入式软件