嵌入式图形库:LVGL(得想办法把这个移植到AI8051U上, 34K RAM)
LVGL是最流行的免费和开源嵌入式图形库,可以为任何单片机、MPU和显示类型创建漂亮的UIS。从消费电子到工业自动化,任何应用都可以利用lvgl的30+内置小部件、100+风格属性、网络启发布局和印刷系统支持多种语言。
https://lvgl.io/
https://github.com/lvgl/lvgl
https://lvgl.100ask.net/master/index.html
Introduction(介绍)显示原文LVGL (Light and Versatile Graphics Library) is a free and open-source graphics library providing everything you need to create an embedded GUI with easy-to-use graphical elements, beautiful visual effects and a low memory footprint.
LVGL(轻量级和通用图形库)是一个免费和开源的图形库,它提供了创建嵌入式GUI所需的一切,具有易于使用的图形元素,美丽的视觉效果和低内存占用。Key features(主要特性)显示原文
[*]Powerful building blocks such as buttons, charts, lists, sliders, images, etc.
[*]Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling
[*]Various input devices such as touchpad, mouse, keyboard, encoder, etc.
[*]Multi-language support with UTF-8 encoding
[*]Multi-display support, i.e. use multiple TFT, monochrome displays simultaneously
[*]Fully customizable graphic elements with CSS-like styles
[*]Hardware independent: use with any microcontroller or display
[*]Scalable: able to operate with little memory (64 kB Flash, 16 kB RAM)
[*]OS, external memory and GPU are supported but not required
[*]Single frame buffer operation even with advanced graphic effects
[*]Written in C for maximal compatibility (C++ compatible)
[*]Simulator to start embedded GUI design on a PC without embedded hardware
[*]Binding to MicroPython
[*]Tutorials, examples, themes for rapid GUI design
[*]Documentation is available online and as PDF
[*]Free and open-source under MIT license
[*]丰富且强大的模块化图形组件:按钮 (buttons)、图表 (charts)、列表 (lists)、滑动条 (sliders)、图片 (images) 等
[*]高级的图形引擎:动画、抗锯齿、透明度、平滑滚动、图层混合等效果
[*]支持多种输入设备:触摸屏、 键盘、编码器、按键等
[*]支持多显示设备
[*]不依赖特定的硬件平台,可以在任何显示屏上运行
[*]配置可裁剪(最低资源占用:64 kB Flash,16 kB RAM)
[*]基于UTF-8的多语种支持,例如中文、日文、韩文、阿拉伯文等
[*]可以通过类CSS的方式来设计、布局图形界面(例如:Flexbox、Grid)
[*]支持操作系统、外置内存、以及硬件加速(LVGL已内建支持STM32 DMA2D、NXP PXP和VGLite)
[*]即便仅有单缓冲区(frame buffer)的情况下,也可保证渲染如丝般顺滑
[*]全部由C编写完成,并支持C++调用
[*]支持Micropython编程,参见:LVGL API in Micropython
[*]支持模拟器仿真,可以无硬件依托进行开发
[*]丰富详实的例程
[*]详尽的文档以及API参考手册,可线上查阅或可下载为PDF格式
[*]在 MIT 许可下免费和开源
Requirements(配置要求)显示原文Basically, every modern controller which is able to drive a display is suitable to run LVGL. The minimal requirements are:
[*]16, 32 or 64 bit microcontroller or processor
[*]> 16 MHz clock speed is recommended
[*]Flash/ROM: > 64 kB for the very essential components (> 180 kB is recommended)
[*]RAM:
[*]Static RAM usage: ~2 kB depending on the used features and object types
[*]stack: > 2kB (> 8 kB is recommended)
[*]Dynamic data (heap): > 2 KB (> 48 kB is recommended if using several objects).Set by LV_MEM_SIZE in lv_conf.h.
[*]Display buffer: > "Horizontal resolution" pixels (> 10 "Horizontal resolution" is recommended)
[*]One frame buffer in the MCU or in an external display controller
[*]C99 or newer compiler
[*]Basic C (or C++) knowledge:
[*]pointers.
[*]structs.
[*]callbacks.
Note:memory usage may vary depending on architecture, compiler and build options.
基本上,每个能够驱动显示器的现代控制器都适合运行 LVGL。 最低要求是:
[*]16、32 或 64 位微控制器或处理器
[*]建议使用 >16 MHz 时钟速度
[*]闪存/ROM: > 64 kB 用于非常重要的组件 (> 建议使用 180 kB)
[*]RAM:
[*]静态 RAM 使用量:~2 kB,取决于使用的功能和对象类型
[*]堆: > 2kB (> 建议使用 8 kB)
[*]动态数据(堆): > 2 KB (> 如果使用多个对象,建议使用 16 kB). 在 lv_conf.h 文件中配置 LV_MEM_SIZE 生效。
[*]显示缓冲区:> “水平分辨率”像素(推荐 >10 × 10ד 水平分辨率”)
[*]MCU或外部显示控制器中的一个帧缓冲区
[*]C99 或更新的编译器
[*]具备基本的 C(或 C++)知识:
[*]pointers。
[*]structs。
[*]callbacks。
注意:资源占用情况与具体硬件平台、编译器等因素有关,上表中仅给出参考值.License(许可证)显示原文The LVGL project (including all repositories) is licensed under MIT license. This means you can use it even in commercial projects.It's not mandatory, but we highly appreciate it if you write a few words about your project in the My projects category of the forum or a private message to lvgl.io.Although you can get LVGL for free there is a massive amount of work behind it. It's created by a group of volunteers who made it available for you in their free time.To make the LVGL project sustainable, please consider Contributing(贡献) to the project. You can choose from many different ways of contributing See Contributing(贡献) such as simply writing a tweet about you using LVGL, fixing bugs, translating the documentation, or even becoming a maintainer.
LVGL 项目(包括所有存储库)在 MIT license 许可下获得许可。 这意味着您甚至可以在商业项目中使用它。这不是强制性的,但如果您在论坛的 My projects 类别或来自 lvgl.io 的私人消息中写下有关您的项目的几句话,我们将不胜感激。尽管您可以免费获得 LVGL,但它背后的工作量很大。它由一群志愿者创建,他们在空闲时间为您提供。为了使 LVGL 项目可持续,请考虑为该项目做 Contributing(贡献) 。您可以从多种投稿方式中进行选择,例如简单地写一条关于您正在使用 LVGL 的推文、修复错误、翻译文档,甚至成为维护者。Repository layout(仓库布局)显示原文All repositories of the LVGL project are hosted on GitHub
LVGL 项目的所有代码仓库都托管在 GitHub显示原文You will find these repositories there:
[*]lvgl: The library itself with many examples and demos.
[*]lv_drivers: Display and input device drivers
[*]blog: Source of the blog's site
[*]sim: Source of the online simulator's site
[*]lv_port_*: LVGL ports to development boards or environments
[*]lv_binding_*: Bindings to other languages
您可以从下面的列表获取到lvgl所有相关的代码仓库:
[*]lvgl:本身有很多 例子 和 演示示例。
[*]lv_drivers: 显示和输入设备驱动程序。
[*]博客: 博客站点的来源。
[*]sim: 在线模拟器网站的来源。
[*]lv_port_*: LVGL到端口或开发板。
[*]lv_binding_*: 绑定到其他语言。
Release policy(发布策略)显示原文The core repositories follow the rules of Semantic versioning:
[*]Major version: incompatible API changes. E.g. v5.0.0, v6.0.0
[*]Minor version: new but backward-compatible functionalities. E.g. v6.1.0, v6.2.0
[*]Patch version: backward-compatible bug fixes. E.g. v6.1.1, v6.1.2
Tags like vX.Y.Z are created for every release.
LVGL库遵循 语义版本管理:
[*]不兼容 API 更改的主要版本。 比如: v5.0.0, v6.0.0
[*]新的但向后兼容的功能的次要版本。 比如: v6.1.0, v6.2.0
[*]用于向后兼容错误修复的补丁版本。 比如: v6.1.1, v6.1.2
[*]为每个版本创建诸如 vX.Y.Z 之类的标签。
Release cycle(发布周期)显示原文
[*]Bug fixes: Released on demand even weekly
[*]Minor releases: Every 3-4 months
[*]Major releases: Approximately yearly
[*]错误修复:每周按需发布
[*]次要版本:每 3-4 个月
[*]主要版本:大约每年
Branches(分支)显示原文The core repositories have at least the following branches:
[*]master: latest version, patches are merged directly here.
[*]release/vX.Y: stable versions of the minor releases
[*]fix/some-description: temporary branches for bug fixes
[*]feat/some-description: temporary branches for features
核心存储库至少有以下分支:
[*]master: 最新版本,此处直接合并补丁。
[*]release/vX.Y: 次要版本的稳定版本
[*]fix/some-description: 错误修复的临时分支
[*]feat/some-description: 功能的临时分支
Changelog(变更日志)显示原文The changes are recorded in Changelog(更改日志).
更改记录在 Changelog(更改日志) 中。Version support(版本支持)显示原文Before v8 the last minor release of each major series was supported for 1 year. Starting from v8, every minor release is supported for 1 year.
VersionRelease dateSupport endActive
v5.31 Feb, 20191 Feb, 2020No
v6.126 Nov, 201926 Nov, 2020No
v7.1116 Mar, 202116 Mar, 2022No
v8.01 Jun, 20211 Jun, 2022No
v8.110 Nov, 202110 Nov, 2022No
v8.231 Jan, 202231 Jan, 2023No
v8.36 July, 20221 Jan, 2025Yes
v9.0In progress
在v8之前,每个主要版本的次要版本都支持1年。从v8开始,每个次要版本都支持1年。
wnagming 发表于 2024-9-1 21:37
本人不太喜欢51单片机驱动图形库,毕竟图形库消耗资源,给其他功能留的就不多了,要是主要功能都完成,还有 ...
AI8051U 的 RAM 是34K, 比 普通M0/M3内核的MCU RAM 多 能用了么? 这个要点赞关注,希望能应用到 AI8051U 上 考虑过,,然后看到官方的硬件需求 然后就放弃了{:4_192:}看看有没有大佬愿意裁剪裁剪 还是搞搞单色库吧,毕竟51刷彩屏有点吃力
U8g2它不香吗。 关注一下{:4_174:} 关注一下,一直在苦恼没有漂亮的UI图标 mark一下
页:
[1]