[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
相关推荐
辰哥单片机设计10 小时前
门磁模块详解(防盗感应开关 STM32)
stm32·单片机·嵌入式硬件·传感器
yrx02030710 小时前
stm32 IIC总线busy解决方法
stm32·单片机·嵌入式硬件
YHPsophie12 小时前
ATGM331C-5T杭州中科微BDS/GNSS全星座定位授时模块应用领域
经验分享·笔记·单片机·信息与通信·交通物流
Archie_IT13 小时前
【STM32系统】基于STM32设计的SD卡数据读取与上位机显示系统(SDIO接口驱动、雷龙SD卡)——文末资料下载
arm开发·stm32·单片机·嵌入式硬件
辰哥单片机设计13 小时前
1×4矩阵键盘详解(STM32)
stm32·单片机·嵌入式硬件·矩阵·传感器
wmkswd13 小时前
CAN总线-STM32上CAN外设
stm32·单片机·嵌入式硬件
Ruohongxu13 小时前
LAN8720A-CP-TR-ABC QFN-24 以太网收发器芯片
单片机
嵌入式大圣14 小时前
STM32 单片机最小系统全解析
stm32·单片机·嵌入式硬件
LN花开富贵19 小时前
stm32g431rbt6芯片中VREF+是什么?在电路中怎么设计?
笔记·stm32·单片机·嵌入式硬件·学习