[LVGL]:MACOS下使用LVGL模拟器

如何在MACOS下使用lvgl模拟器

1.安装必要环境

brew install sdl2

查看sdl2安装位置:

(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

git clone --recursive https://github.com/lvgl/lv_port_pc_vscode

2.2 修改makefile

打开根目录下的Makefile:

将lv_driver修改为sdl2

#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编译与运行

(base) ➜  lv_port_pc_vscode git:(master)make -j12 && ./build/bin/demo

在这里插入图片描述

相关推荐

  1. <span style='color:red;'>LVGL</span>:

    LVGL

    2024-03-15 22:36:03      28 阅读
  2. MAC 搭建LVGL仿真器

    2024-03-15 22:36:03       54 阅读
  3. lvgl移植以及使用记录(1)

    2024-03-15 22:36:03       50 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-03-15 22:36:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-03-15 22:36:03       101 阅读
  3. 在Django里面运行非项目文件

    2024-03-15 22:36:03       82 阅读
  4. Python语言-面向对象

    2024-03-15 22:36:03       91 阅读

热门阅读

  1. 通过Python pypdf库轻松拆分大型PDF文件

    2024-03-15 22:36:03       48 阅读
  2. Lucene 分词 示例代码

    2024-03-15 22:36:03       36 阅读
  3. 字符串的排列(LeetCode 567)

    2024-03-15 22:36:03       38 阅读
  4. jupyterlab 设置

    2024-03-15 22:36:03       36 阅读
  5. 嵌入式面经-TCP/UDP

    2024-03-15 22:36:03       35 阅读
  6. 开发小程序不破产!预算周期大揭秘,小白必看

    2024-03-15 22:36:03       36 阅读
  7. 【数据结构学习笔记】选择排序

    2024-03-15 22:36:03       46 阅读
  8. 回调函数的介绍

    2024-03-15 22:36:03       38 阅读