# lvgl linux arm **Repository Path**: ld3003/lv_port_linux_frame_buffer ## Basic Information - **Project Name**: lvgl linux arm - **Description**: lv_port_linux_frame_buffer - **Primary Language**: Unknown - **License**: CC-BY-SA-4.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-03-15 - **Last Updated**: 2025-07-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # lvgl_linux_arm帧缓存工程 #### 介绍 lvgl linux arm 帧缓存工程 #### 软件架构 项目原地址: https://github.com/lvgl/lv_port_linux_frame_buffer.git #### 安装教程 1. Download工程项目源码 git clone https://gitee.com/already_use/lvgl_linux_arm.git 2. 修改 lv_port_linux_frame_buffer/makefile 里面的cc编译器以及安装目录 CC ?= gcc 改为 CC := arm-linux-gcc prefix ?= ./output 低版本arm-linux-gcc可能要删除CFLAGS包含的 -Wshift-negative-value 标志 3. 在lv_port_linux_frame_buffer目录里添加 output 目录 mkdir output 4. 在lv_port_linux_frame_buffer/makefile里添加 .PHONY: install 5. 执行编译命令 make -j4 6. 执行安装命令 make install 如果遇到编译报警:arm-linux-gcc: 错误:unrecognized command line option ‘-Wshift-negative-value’ 删除makefile CFLAGS包含的 -Wshift-negative-value 标志。 #### 使用说明 1. 修改项目文件 lv_conf.h 的第33行改为屏幕的颜色位数rgb565 #define LV_COLOR_DEPTH 16 //32 2. 修改项目文件 lv_drv_conf.h 334行指定使用的屏幕,如果默认为fb0则不用修改 #define FBDEV_PATH "/dev/fb0" 3. 修改项目文件 lv_drv_conf.h 450行 改为实际映射的鼠标或者触摸屏映射驱动文件 #define EVDEV_NAME "/dev/input/event10" /*You can use the "evtest" Linux tool to get the list of devices and test them*/ 修改为实际的触摸屏或者鼠标文件 #define EVDEV_NAME "/dev/input/event0" /*You can use the "evtest" Linux tool to get the list of devices and test them*/ 4. 修改main.c文件 32和33行 disp_drv.hor_res = 800;//屏幕宽度 disp_drv.ver_res = 480;//屏幕高度 改为实际屏幕的宽高 disp_drv.hor_res = 640; disp_drv.ver_res = 480; 5. 测试程序 在output里有可以运行的demo文件, 拷贝到arm linux 开发板运行 ./demo 即可执行。 ./demo 如果有警告: ioctl(FBIOBLANK): Invalid argument 则屏蔽代码lvgl_linux_arm\lv_port_linux_frame_buffer\lv_drivers\display\fbdev.c 101-105 行: // Make sure that the display is on. // if (ioctl(fbfd, FBIOBLANK, FB_BLANK_UNBLANK) != 0) { // perror("ioctl(FBIOBLANK)"); // return; 1. Fork 本仓库 2. 新建 Feat_xxx 分支 3. 提交代码 4. 新建 Pull Request #### 特技 1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md 2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) 3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) 6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)