[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
相关推荐
736c8 小时前
STM32-FLASH 11
stm32·单片机
Zhang.Yi9 小时前
STM32-ADC
stm32·单片机·嵌入式硬件
Messy create12 小时前
【储能系统三大核心】
网络·stm32·单片机·算法·能源
Nomarsgo12 小时前
生产车间产线巡检解决方案:基于联控 Lionconit PTC-1006 工业手持平板电脑打造移动化、数字化车间巡检终端
单片机·嵌入式硬件·电脑
IT实战课堂之秋老师12 小时前
基于IOT技术的太阳能板表面清洁程度检测系统设计
单片机
智购科技无人售货机厂家12 小时前
2026自动售货机出货口防夹手设计:从红外检测到电机反转的工程实践~YH
大数据·linux·单片机·嵌入式硬件·微信
CHENKONG_CK13 小时前
晨控CK-FR08系列与欧姆龙NX系列PLC配置MODBUSTCP例程使用手册
网络·单片机·嵌入式硬件
XiHongShi201613 小时前
51基础学习视频分享(2),三极管,点亮LED灯
单片机·学习
youshi666815 小时前
stm32-看门狗
stm32·单片机·嵌入式硬件
M1582276905515 小时前
三格串口服务器:RS232/485 设备联网解决方案
运维·服务器·单片机