[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
相关推荐
文军的烹饪实验室2 小时前
处理器架构、单片机、芯片、光刻机之间的关系
单片机·嵌入式硬件·架构
jmlinux3 小时前
STM32 HAL库USART串口DMA IDLE中断编程:避坑指南
stm32·单片机·嵌入式硬件
沐欣工作室_lvyiyi4 小时前
基于单片机的智能电表设计(论文+源码)
单片机·嵌入式硬件·电能表·数字电能表
半导体老登5 小时前
新能源汽车核心元件揭秘:二极管、三极管结构与工作原理解析(2/2)
人工智能·单片机·嵌入式硬件·汽车
猿~~~7 小时前
STM32的HAL库开发---多通道ADC采集(DMA读取)实验
stm32·单片机·嵌入式硬件
kongba0078 小时前
Cursor提示词模板,开发GD32,C语言开发GD32 ARM单片机编程规范提示词 大厂风格代码规范
c语言·arm开发·单片机
LaoZhangGong1239 小时前
STM32的“Unique device ID“能否修改?
c语言·经验分享·stm32·单片机·嵌入式硬件
1101 110111 小时前
STM32-心知天气项目
stm32·单片机·嵌入式硬件
Ronin-Lotus11 小时前
嵌入式硬件篇---数字电子技术中的时序逻辑
单片机·嵌入式硬件·蓝桥杯·时序分析·数字电子技术
sinat_3607048221 小时前
STM32 看门狗
stm32·单片机·嵌入式硬件