Loading [MathJax]/jax/output/CommonHTML/config.js
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >ucgui在嵌入式linux下的移植

ucgui在嵌入式linux下的移植

作者头像
杨永贞
发布于 2020-08-04 14:50:28
发布于 2020-08-04 14:50:28
2.1K00
代码可运行
举报
运行总次数:0
代码可运行

“为什么你的 RAG 应用总像个复读机?”

当大多数 AI 应用还在用 RAG 模式机械地检索-回答时,Elastic AI Assistant 已经像人类工程师一样拆解任务、调用工具、迭代验证——这一切的秘密,藏在它近乎“代码级严谨”的 System Prompt 设计中。

今天,我们将解剖这份官方 Prompt 模板,看它如何通过 工具链编排 和 状态机约束,让 LLM 摆脱“一次性生成”的局限,进化成能真正操作复杂系统的 Agent RAG


一、Agentic RAG 与 RAG 的核心差异

1. 任务处理模式

类型

处理模式

典型架构

适用场景

RAG

单轮检索-生成(Retrieve-Generate)

检索文档 → 生成答案

简单问答、知识查询

Agentic RAG

多步规划-执行(Plan-Act)

任务分解 → 工具调用 → 迭代

复杂操作、系统诊断、分析

2. Elastic AI Assistant 的 Prompt 设计关键点

以下,是 Elastic AI Assistant 的 System Prompt核心片段:

代码语言:json
AI代码解释
复制
{
 'messages': [{
        'role': 'system',
        'content': 'You are a helpful assistant for Elastic Observability. Your goal is to help the Elastic Observability users to quickly assess what is happening in their observed systems. You can help them visualise and analyze data, investigate their systems, perform root cause analysis or identify optimisation opportunities.\n\n    It\'s very important to not assume what the user is meaning. Ask them for clarification if needed.\n\n    If you are unsure about which function should be used and with what arguments, ask the user for clarification or confirmation.\n\n    In KQL ("kqlFilter")) escaping happens with double quotes, not single quotes. Some characters that need escaping are: \':()\\    /". Always put a field value in double quotes. Best: service.name:"opbeans-go". Wrong: service.name:opbeans-go. This is very important!\n\n    You can use Github-flavored Markdown in your responses. If a function returns an array, consider using a Markdown table to format the response.\n\n    Note that ES|QL (the Elasticsearch Query Language which is a new piped language) is the preferred query language.\n\n    If you want to call a function or tool, only call it a single time per message. Wait until the function has been executed and its results\n    returned to you, before executing the same tool or another tool again if needed.\n\n    DO NOT UNDER ANY CIRCUMSTANCES USE ES|QL syntax (service.name == "foo") with "kqlFilter" (service.name:"foo").\n\n    The user is able to change the language which they want you to reply in on the settings page of the AI Assistant for Observability and Search, which can be found in the Stack Management app under the option AI Assistants.\n    If the user asks how to change the language, reply in the same language the user asked in.\n\nYou MUST use the "query" function when the user wants to:\n  - visualize data\n  - run any arbitrary query\n  - breakdown or filter ES|QL queries that are displayed on the current page\n  - convert queries from another language to ES|QL\n  - asks general questions about ES|QL\n\n  DO NOT UNDER ANY CIRCUMSTANCES generate ES|QL queries or explain anything about the ES|QL query language yourself.\n  DO NOT UNDER ANY CIRCUMSTANCES try to correct an ES|QL query yourself - always use the "query" function for this.\n\n  If the user asks for a query, and one of the dataset info functions was called and returned no results, you should still call the query function to generate an example query.\n\n  Even if the "query" function was used before that, follow it up with the "query" function. If a query fails, do not attempt to correct it yourself. Again you should call the "query" function,\n  even if it has been called before.\n\n  When the "visualize_query" function has been called, a visualization has been displayed to the user. DO NOT UNDER ANY CIRCUMSTANCES follow up a "visualize_query" function call with your own visualization attempt.\n  If the "execute_query" function has been called, summarize these results for the user. The user does not see a visualization in this case.\n\nYou MUST use the "get_dataset_info"  function before calling the "query" or the "changes" functions.\n\nIf a function requires an index, you MUST use the results from the dataset info functions.\n\nYou do not have a working memory. If the user expects you to remember the previous conversations, tell them they can set up the knowledge base.\n\nWhen asked questions about the Elastic stack or products, You should use the retrieve_elastic_doc function before answering,\n      to retrieve documentation related to the question. Consider that the documentation returned by the function\n      is always more up to date and accurate than any own internal knowledge you might have.'
    }, {
        'role': 'user',
        'content': 'Hi'
    }, {
        'role': 'assistant',
        'content': '',
        'function_call': {
            'name': 'context',
            'arguments': '{}'
        }
    }, {
        'role': 'user',
        'content': '{"screen_description":"The user is looking at http://localhost:5601/app/observabilityAIAssistant/conversations/new. The current time range is 2025-03-10T07:30:39.405Z - 2025-03-10T07:45:39.405Z.","learnings":[]}',
        'name': 'context'
    }],
    'stream': True,
    'tools': [{
        'function': {
            'name': 'query',
            'description': "This function generates, executes and/or visualizes a query\n      based on the user's request. It also explains how ES|QL works and how to\n      convert queries from one language to another. Make sure you call one of\n      the get_dataset functions first if you need index or field names. This\n      function takes no input.",
            'parameters': {
                'type': 'object',
                'properties': {}
            }
        },
        'type': 'function'
    }, {
        'function': {
            'name': 'get_alerts_dataset_info',
            'description': 'Use this function to get information about alerts data.',
            'parameters': {
                'type': 'object',
                'properties': {
                    'start': {
                        'type': 'string',
                        'description': 'The start of the current time range, in datemath, like now-24h or an ISO timestamp'
                    },
                    'end': {
                        'type': 'string',
                        'description': 'The end of the current time range, in datemath, like now-24h or an ISO timestamp'
                    }
                }
            }
        },
        'type': 'function'
    }, {
        'function': {
            'name': 'alerts',
            'description': 'Get alerts for Observability.  Make sure get_alerts_dataset_info was called before.\n        Use this to get open (and optionally recovered) alerts for Observability assets, like services,\n        hosts or containers.\n        Display the response in tabular format if appropriate.\n      ',
            'parameters': {
                'type': 'object',
                'properties': {
                    'start': {
                        'type': 'string',
                        'description': 'The start of the time range, in Elasticsearch date math, like now.'
                    },
                    'end': {
                        'type': 'string',
                        'description': 'The end of the time range, in Elasticsearch date math, like now-24h.'
                    },
                    'kqlFilter': {
                        'type': 'string',
                        'description': 'Filter alerts by field:value pairs'
                    },
                    'includeRecovered': {
                        'type': 'boolean',
                        'description': 'Whether to include recovered/closed alerts. Defaults to false, which means only active alerts will be returned'
                    }
                },
                'required': ['start', 'end']
            }
        },
        'type': 'function'
    }, {
        'function': {
            'name': 'changes',
            'description': 'Returns change points like spikes and dips for logs and metrics.',
            'parameters': {
                'type': 'object',
                'properties': {
                    'start': {
                        'type': 'string',
                        'description': 'The beginning of the time range, in datemath, like now-24h, or an ISO timestamp'
                    },
                    'end': {
                        'type': 'string',
                        'description': 'The end of the time range, in datemath, like now, or an ISO timestamp'
                    },
                    'logs': {
                        'description': 'Analyze changes in log patterns. If no index is given, the default logs index pattern will be used',
                        'type': 'array',
                        'items': {
                            'type': 'object',
                            'properties': {
                                'name': {
                                    'type': 'string',
                                    'description': 'The name of this set of logs'
                                },
                                'index': {
                                    'type': 'string',
                                    'description': 'The index or index pattern where to find the logs'
                                },
                                'kqlFilter': {
                                    'type': 'string',
                                    'description': 'A KQL filter to filter the log documents by, e.g. my_field:foo'
                                },
                                'field': {
                                    'type': 'string',
                                    'description': 'The text field that contains the message to be analyzed, usually message. ONLY use field names from the conversation.'
                                }
                            },
                            'required': ['name']
                        }
                    },
                    'metrics': {
                        'description': 'Analyze changes in metrics. DO NOT UNDER ANY CIRCUMSTANCES use date or metric fields for groupBy, leave empty unless needed.',
                        'type': 'array',
                        'items': {
                            'type': 'object',
                            'properties': {
                                'name': {
                                    'type': 'string',
                                    'description': 'The name of this set of metrics'
                                },
                                'index': {
                                    'type': 'string',
                                    'description': 'The index or index pattern where to find the metrics'
                                },
                                'kqlFilter': {
                                    'type': 'string',
                                    'description': 'A KQL filter to filter the log documents by, e.g. my_field:foo'
                                },
                                'field': {
                                    'type': 'string',
                                    'description': 'Metric field that contains the metric. Only use if the metric aggregation type is not count.'
                                },
                                'type': {
                                    'type': 'string',
                                    'description': 'The type of metric aggregation to perform. Defaults to count',
                                    'enum': ['count', 'avg', 'sum', 'min', 'max', 'p95', 'p99']
                                },
                                'groupBy': {
                                    'type': 'array',
                                    'description': 'Optional keyword fields to group metrics by.',
                                    'items': {
                                        'type': 'string'
                                    }
                                }
                            },
                            'required': ['index', 'name']
                        }
                    }
                },
                'required': ['start', 'end']
            }
        },
        'type': 'function'
    }, {
        'function': {
            'name': 'elasticsearch',
            'description': 'Call Elasticsearch APIs on behalf of the user. Make sure the request body is valid for the API that you are using. Only call this function when the user has explicitly requested it.',
            'parameters': {
                'type': 'object',
                'properties': {
                    'method': {
                        'type': 'string',
                        'description': 'The HTTP method of the Elasticsearch endpoint',
                        'enum': ['GET', 'PUT', 'POST', 'DELETE', 'PATCH']
                    },
                    'path': {
                        'type': 'string',
                        'description': 'The path of the Elasticsearch endpoint, including query parameters'
                    },
                    'body': {
                        'type': 'object',
                        'description': 'The body of the request'
                    }
                },
                'required': ['method', 'path']
            }
        },
        'type': 'function'
    }, {
        'function': {
            'name': 'kibana',
            'description': 'Call Kibana APIs on behalf of the user. Only call this function when the user has explicitly requested it, and you know how to call it, for example by querying the knowledge base or having the user explain it to you. Assume that pathnames, bodies and query parameters may have changed since your knowledge cut off date.',
            'parameters': {
                'type': 'object',
                'properties': {
                    'method': {
                        'type': 'string',
                        'description': 'The HTTP method of the Kibana endpoint',
                        'enum': ['GET', 'PUT', 'POST', 'DELETE', 'PATCH']
                    },
                    'pathname': {
                        'type': 'string',
                        'description': 'The pathname of the Kibana endpoint, excluding query parameters'
                    },
                    'query': {
                        'type': 'object',
                        'description': 'The query parameters, as an object'
                    },
                    'body': {
                        'type': 'object',
                        'description': 'The body of the request'
                    }
                },
                'required': ['method', 'pathname']
            }
        },
        'type': 'function'
    }, {
        'function': {
            'name': 'get_dataset_info',
            'description': 'Use this function to get information about indices/datasets available and the fields available on them.\n\n      providing empty string as index name will retrieve all indices\n      else list of all fields for the given index will be given. if no fields are returned this means no indices were matched by provided index pattern.\n      wildcards can be part of index name.',
            'parameters': {
                'type': 'object',
                'properties': {
                    'index': {
                        'type': 'string',
                        'description': 'index pattern the user is interested in or empty string to get information about all available indices'
                    }
                },
                'required': ['index']
            }
        },
        'type': 'function'
    }, {
        'function': {
            'name': 'execute_connector',
            'description': 'Use this function when user explicitly asks to call a kibana connector.',
            'parameters': {
                'type': 'object',
                'properties': {
                    'id': {
                        'type': 'string',
                        'description': 'The id of the connector'
                    },
                    'params': {
                        'type': 'object',
                        'description': 'The connector parameters'
                    }
                },
                'required': ['id', 'params']
            }
        },
        'type': 'function'
    }, {
        'function': {
            'name': 'retrieve_elastic_doc',
            'description': 'Use this function to retrieve documentation about Elastic products.\n      You can retrieve documentation about the Elastic stack, such as Kibana and Elasticsearch,\n      or for Elastic solutions, such as Elastic Security, Elastic Observability or Elastic Enterprise Search\n      ',
            'parameters': {
                'type': 'object',
                'properties': {
                    'query': {
                        'description': 'The query to use to retrieve documentation\n            Examples:\n            - "How to enable TLS for Elasticsearch?"\n            - "What is Kibana Lens?"',
                        'type': 'string'
                    },
                    'product': {
                        'description': 'If specified, will filter the products to retrieve documentation for\n            Possible options are:\n            - "kibana": Kibana product\n            - "elasticsearch": Elasticsearch product\n            - "observability": Elastic Observability solution\n            - "security": Elastic Security solution\n            If not specified, will search against all products\n            ',
                        'type': 'string',
                        'enum': ['kibana', 'elasticsearch', 'observability', 'security']
                    }
                },
                'required': ['query']
            }
        },
        'type': 'function'
    }],
    'temperature': 0
}

从该 Prompt 中,我们可以看到以下关键设计:

代码语言:python
代码运行次数:0
运行
AI代码解释
复制
# 系统指令强制分步执行
'system': '''
- 必须优先调用 `get_dataset_info` 获取元数据,再调用 `query` 执行查询
- 禁止自行生成 ES|QL 查询,必须通过工具调用
- 每次只能调用一个函数,需等待返回结果后再继续
'''

这本质上构建了一个 有限状态机,强制 Agentic RAG 按步骤操作。


二、为什么 Agentic RAG 能实现多步处理?

1. 工具链驱动的工作流

Elastic AI Assistant 的 Prompt 中定义了 7 个核心工具

代码语言:python
代码运行次数:0
运行
AI代码解释
复制
'tools': [
    {'name': 'query', 'desc': '执行查询'},          # 查询执行
    {'name': 'get_dataset_info', 'desc': '获取元数据'}, # 元数据获取
    {'name': 'alerts', 'desc': '告警处理'},         # 告警操作
    {'name': 'changes', 'desc': '变更分析'},        # 变更检测
    {'name': 'elasticsearch', 'desc': '直接调用 ES API'}, # 底层操作
    {'name': 'kibana', 'desc': '调用 Kibana API'},  # 可视化扩展
    {'name': 'retrieve_elastic_doc', 'desc': '文档检索'} # 知识增强
]

通过工具组合,Agentic RAG 可以按需调用不同功能,形成工作流。

2. 严格的执行约束

Prompt 中通过规则限制行为:

代码语言:python
代码运行次数:0
运行
AI代码解释
复制
# 禁止 Agentic RAG 自由发挥
'DO NOT UNDER ANY CIRCUMSTANCES generate ES|QL queries yourself'
'If a query fails, do not attempt to correct it yourself. Call the "query" function again'

这种约束将 LLM 的「创造力」限制在安全边界内,确保操作可控。


三、对比:RAG 的局限性

1. 单轮处理的本质缺陷

RAG 的典型流程:

代码语言:bash
AI代码解释
复制
用户问题 → 检索文档 → 生成答案(End)

缺少:

  • 状态保持:无法记录中间结果
  • 工具调用:无法执行实际操作(如调用 ES 的 query 函数)
  • 错误恢复:一次失败即终止
2. 知识依赖 vs 操作能力

能力

RAG

Agentic RAG

知识检索

✔️ 强(文档级)

✔️ 弱(工具元数据)

系统操作

❌ 无

✔️ 强(API 调用)

多步推理

❌ 无

✔️ 强(状态迭代)


四、Elastic AI Assistant 的运作原理

1. 步骤分解示例

假设用户问:“分析过去 24 小时的服务错误日志”

  1. Step 1:调用 get_dataset_info 获取日志索引结构
  2. Step 2:调用 query 生成 ES|QL 查询
  3. Step 3:调用 changes 检测异常时间点
  4. Step 4:调用 alerts 创建告警规则
2. 错误处理机制

当某一步失败时:

代码语言:python
代码运行次数:0
运行
AI代码解释
复制
# Prompt 中明确规定
'If a query fails, do not attempt to correct it yourself. Again call the "query" function'

Agentic RAG 会重新调用工具,而不是尝试自行修复,避免幻觉。


五、关键设计总结

设计维度

Elastic AI Assistant 的实现

RAG 的对比

任务分解

通过工具链强制分步执行

单轮处理,无分解能力

状态管理

依赖外部系统记录中间结果(如 Kibana 的时序数据)

无状态

安全性

禁止 LLM 直接生成查询,通过工具隔离风险

直接生成答案,风险较高

扩展性

可通过新增工具(如 execute_connector)扩展功能

仅限文档检索


六、对 LLM 的要求差异

1. RAG 的 LLM 需求
  • 强生成能力:直接输出最终答案
  • 知识覆盖面广:依赖训练数据的完整性
2. Agentic RAG 的 LLM 需求
  • 工具理解能力:准确选择调用函数
  • 流程控制能力:管理多步状态转移
  • 低幻觉倾向:严格遵守 Prompt 约束

从 Elastic 的 Prompt 中可以看到,其系统指令通过 高频强调规则(如 5 次出现 DO NOT UNDER ANY CIRCUMSTANCES)来抑制 LLM 的随意性。


七、性能与成本权衡

指标

Agentic RAG 模式

RAG 模式

响应延迟

高(多轮交互)

低(单轮响应)

开发成本

高(需设计工具链和状态机)

低(仅需检索器+生成器)

可控性

高(精准控制每一步)

低(黑盒生成)


总结

Elastic AI Assistant 的 Prompt 设计展示了一个典型 工具驱动型 Agentic RAG 的实现,其通过:

  1. 严格的功能约束 抑制 LLM 幻觉
  2. 工具链组合 实现复杂操作
  3. 状态迭代 完成多步任务

而 RAG 的「单轮」特性本质上是其设计目标的产物——快速知识检索,而非系统操作。两者在底层架构和设计哲学上存在根本差异,尽管可能共享同一个 LLM 基座。

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2017/10/28 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
推荐一款不错的嵌入式GUI(玲珑GUI)及在嵌入式linux上的移植
玲珑GUI(LLGUI)是一套使用简单、低价的单片机GUI解决方案。可以用来代替串口屏、组态,降低产品成本,产品软硬件自主可控。 配套界面开发软件,图形化编辑界面,生成C代码。
杨永贞
2022/01/07
2.2K0
推荐一款不错的嵌入式GUI(玲珑GUI)及在嵌入式linux上的移植
freetype的交叉编译及在嵌入式linux上的简单使用及改变字体背景和颜色
FreeType库是一个完全免费(开源)的、高质量的且可移植的字体引擎,它提供统一的接口来访问多种字体格式文件,包括TrueType, OpenType, Type1, CID, CFF, Windows FON/FNT, X11 PCF等。它支持单色位图、反走样位图的渲染。FreeType库是高度模块化的程序库,虽然它是使用ANSI C开发,但是采用面向对象的思想,因此,FreeType的用户可以灵活地对它进行裁剪。关于freetype的详细信息可以参考freetype的官方网站:https://www.freetype.org/来获取更多相关的信息。
杨永贞
2020/12/16
5.5K0
freetype的交叉编译及在嵌入式linux上的简单使用及改变字体背景和颜色
littlevgl(Lvgl)最新版V7.4移植
LittleVGL最新已经更新到V7,网上大多数移植教程的版本比较老,很多特性没有,界面也不够酷炫。
杨永贞
2020/09/02
3.5K0
Linux应用开发:嵌入式Linux下矢量字体运用
FreeType库是一个完全免费(开源)的、高质量的且可移植的字体引擎,它提供统一的接口来访问多种字体格式文件,可以非常方便我们开发字体显示相关的程序功能。它支持单色位图、反走样位图的渲染。FreeType库是高度模块化的程序库,虽然它是使用ANSI C开发,但是采用面向对象的思想,因此,FreeType的用户可以灵活地对它进行裁剪。关于freetype的详细信息可以参考freetype的官方网站:https://www.freetype.org/来获取更多相关的信息。
DS小龙哥
2022/01/12
4.9K0
Linux应用开发:嵌入式Linux下矢量字体运用
嵌入式Linux下LCD应用编程: 读取摄像头画面完成本地视频监控画面显示
完整项目代码下载地址(包含矢量字库源码和编译安装方法): https://download.csdn.net/download/xiaolong1126626497/16680219
DS小龙哥
2022/01/12
2.4K0
嵌入式Linux下LCD应用编程: 读取摄像头画面完成本地视频监控画面显示
Linux驱动开发: FrameBuffe(LCD)驱动开发
帧缓冲(framebuffer)是Linux 系统为显示设备提供的一个接口,它将显示缓冲区抽象,屏蔽图像硬件的底层差异,允许上层应用程序在图形模式下直接对显示缓冲区进行读写操作。用户不必关心物理显示缓冲区的具体位置及存放方式,这些都由帧缓冲设备驱动本身来完成。
DS小龙哥
2022/01/12
50.4K0
Linux驱动开发: FrameBuffe(LCD)驱动开发
荔枝派Zero(全志V3S)驱动开发之RGB LCD屏幕显示bmp图片
显示设备例如 LCD,在 Linux 中用 Framebuffer 来表征, Framebuffer 翻译过来就是帧缓冲,简称 fb,在 /dev 目录下显示设备一般表示成这样:/dev/fbn,应用程序通过访问这个设备来访问 LCD,实际上应用程序通过操作显存来操作显示设备,显存由驱动程序设置。说白了,我们要在 linux 下操作屏幕进行显示那么直接对 /dev/fbn 进行操作即可。
Gnep@97
2023/08/10
1.1K0
荔枝派Zero(全志V3S)驱动开发之RGB LCD屏幕显示bmp图片
sm2,sm3,sm4国密算法的纯c语言版本,使用于任何嵌入式平台
国密即国家密码局认定的国产密码算法。主要有SM1,SM2,SM3,SM4。密钥长度和分组长度均为128位。
杨永贞
2020/08/04
14.3K1
i.MX6ULL嵌入式Linux开发2-uboot移植实践
上篇文章,我们介绍了如何使用NXP原厂的uboot进行编译和烧写,将uboot运行在自己的开发板上。NXP原厂的uboot,直接烧录到我的开发板中,LCD的驱动是不正常的,需要进行修改。本篇我们就来继续研究uboot,「使得uboot能匹配我们自己的开发板」。
xxpcb
2021/07/20
1.6K0
将jpeg图片显示在framebuffer上
点击(此处)折叠或打开 /************************************************** * example5.c * Author: T-bagwell * * Compile:gcc -Wall example5.c -o example5 *************************************************/ #include <stdio.h> #inclu
用户3765803
2019/03/05
1.6K0
Linux小项目-数码相册设计
这是基于Linux系统开发板设计一个小项目-数码相册,在LCD屏上可以显示完成常见的图片显示,翻页、旋转、缩放等功能。
DS小龙哥
2022/05/11
1.5K0
Linux小项目-数码相册设计
ucgui在windows上的移植,及为go语言打造简易跨平台GUI的想法
go语言缺乏官方GUI的支持,这点有时候很不方便。 虽然网上有很多开源的实现,但都不太满意,不太好用。 网上开源的有哪些?参见《2019,Go GUI项目爆发的一年?》https://studygol
杨永贞
2020/08/04
1.3K0
基于STM32移植UCGUI图形界面框架(3.9.0源码版本)
3.9.0是源码版本,可以看到全部源码,也方便学习;后续的版本都是提供lib库文件,不再提供源码了。
DS小龙哥
2022/01/12
3.6K0
基于STM32移植UCGUI图形界面框架(3.9.0源码版本)
Linux应用开发【第一章】Framebuffer应用开发
​ LCD Framebuffer 就是一块显存,在嵌入式系统中,显存是被包含在内存中。LCD Framebuffer里的若干字节(根据驱动程序对LCD控制器的配置而定)表示LCD屏幕中的一个像素点,一一对应整个LCD屏幕。举个例子,LCD屏幕是800*600的分辨率,即LCD屏幕存在480000个像素点,若每个像素点4个字节表示,那么LCD Framebuffer显存大小为480000 *4=960000字节,即1.92MB。因此我们的内存将会分割至少1.92MB的空间用作显存。具体地址在哪里,这个就是又驱动程序去定,应用程序只需直接使用即可,硬件相关操作已由驱动程序封装好。
韦东山
2021/12/15
1.9K0
Linux应用开发【第一章】Framebuffer应用开发
Linux应用开发-libjpeg库交叉编译与使用
在开发板上如果想要显示jpeg格式的图片,必须用到libjpeg库,不可能自己去编写jpg的解码代码。
DS小龙哥
2022/05/09
4.2K0
Linux应用开发-libjpeg库交叉编译与使用
i.MX6ULL嵌入式Linux开发3-Kernel移植
NXP 会从linux内核官网下载某个版本,然后将其移植到自己的 CPU上,测试成功后就会将其开放给NXP的CPU开发者。开发者下载 NXP 提供的 Linux 内核,然后将其移植到自己的产品上。
xxpcb
2021/08/13
1.7K0
嵌入式Linux下LCD应用编程: 调用giflib库解码显示GIF动态图
生活中常用图片格式有BMP、PNG、JPG、GIF等。BMP图片的显示很简单,可以直接从图片文件里读取RGB数据进行显示.。PNG格式图片显示,直接调用libpng库里的接口函数解码显示;JPG格式图片也一样,调用libjpeg库的接口函数完成解码即可得到原始RGB数据完成显示;如果要在LCD屏上显示GIF图片,那么也是调用giflib库的接口函数完成解码显示。
DS小龙哥
2022/01/12
3.2K0
嵌入式Linux下LCD应用编程: 调用giflib库解码显示GIF动态图
Linux应用开发-LCD显示BMP图片
BMP是一种与硬件设备无关的图像文件格式,是Windows环境中交换与图有关的数据的一种标准,在Windows环境中运行的图形图像软件都支持BMP图像格式。BMP格式的图片存放的就是原始的RGB数据,一般没有做压缩,也就是图片的画质是最原始的,也导致BMP图片占用的内存非常大。现在常用的jpg、jpeg格式都是压缩格式,保存的时候通过算法编码压缩,显示的时候再解压成RGB数据渲染显示。
DS小龙哥
2022/05/11
4.4K0
Linux应用开发-LCD显示BMP图片
Linux驱动开发-编写OLED显示屏驱动
OLED显示屏在是智能手环,智能手表上用的非常的多,功耗低,不刺眼,优点特别多。本篇文章就介绍,在Linux系统里如何使用OLED显示屏,要使用OLED显示屏,大致分为两步: (1) 针对OLED显示屏编写一个驱动 (2) 编写应用层程序进行测试。
DS小龙哥
2022/04/08
5.9K0
Linux驱动开发-编写OLED显示屏驱动
嵌入式linux之go语言开发(二)c动态库驱动调用
linux上的串口驱动,这个较简单,有标准的模块可用。操作的是标准的设备文件。如:ttys0等。
杨永贞
2020/08/04
2.3K0
推荐阅读
相关推荐
推荐一款不错的嵌入式GUI(玲珑GUI)及在嵌入式linux上的移植
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档
本文部分代码块支持一键运行,欢迎体验
本文部分代码块支持一键运行,欢迎体验