当前位置:网站首页>Liteos opening
Liteos opening
2022-07-21 22:18:00 【alading20160112】
liteos The opening
List of articles
Preface
liteos It is a lightweight open source operating system for the Internet of things developed by Huawei , The smallest kernel provides memory management , Task scheduling , lock , Semaphore is the most basic unit necessary for the operating system , With these modules, there is almost the viscera of the smallest operating system .
One 、 What is? liteos
liteos Is a lightweight real-time operating system , The smallest kernel can be downloaded online , Provides the minimum mechanism of the operating system , Based on these basic mechanisms, you can expand and realize your own business .
Two 、 Use steps
1. Migration of extension library
Such as file system , The implementation of network protocols is in liteos It mainly uses ready-made , for example tcpip The protocol stack is ported lwip, The support for virtual file system is not so perfect , It mainly uses some open source file systems , For example, to use fat32, Then transplant FAT32 The library of , To facilitate application development , Indeed, it was transplanted libc Interface standards like , Give Way linux The program developer under is convenient for development , It also makes linux Under the original many ready-made basic libraries , Easy to transplant , such as json Analytic cJson library ,libxml, database sqlite,mqtt etc. . Try to be up compatible with the previous ecosystem . Of course, this part is unified libc,libc++,libpthread And a series of linux It seems that the basic library under is not open source . We don't focus on . Our focus is on the most basic part of the operating system , memory management , Task scheduling , Lock semaphore, etc , Because of the others driver, file system , Network protocols and so on depend on these basic mechanisms to achieve . This view is no matter in liteos,linux, Hongmeng , Or others such as freertos And so on are based on such ideas , Even in liteos perhaps ucos,freertos We all use some basic function libraries transplanted under lwip,fat32 wait . I think this person who has done embedded system development should have a deep understanding .
2.liteos Framework
liteos It is mainly divided into liteos Minimum system (kernel), also liteos The adaptation layer of , And the upper layer is mainly aimed at the IOT ecosystem sdk. Here's the picture :
concerns
As shown in the figure above, the main focus of specific product development is on these cloud components , System transplantation mainly focuses on the third party MCU Wait to transplant this part , Understanding the operating system requires attention kernel This floor . Although this part of sparrow is small , Five zang organs
liteos kernel The composition of this part is mainly shown in the following figure :
It is mainly divided into two parts , Part of it is to adapt linux Ecology under , adapter linux The interface pair under posix Adaptation made . as well as VFS part ,libc,libc++,STL Equal adaptation , The Internet lwip part . The advantage of doing this is to let the development linux Programmers under can be in liteos Seamless connection under , Another advantage is that linux Some user state libraries under , It can be quickly transplanted to liteos Next , Of course, the premise is that most posix All interfaces support , And sufficient resources .
Another part is the basic kernel , It is also the focus of our explanation , interrupt , Timer , news , Mission , memory management , Lock and other necessary infrastructure of the operating system , This part belongs to the viscera , It belongs to the core of the operating system , Other driver And so on are based on these most basic mechanisms . What we focus on and explain is this part .
Later analysis , In order to explain, it is not so abstract , We're talking about liteos Is based on stm32f103 This processor is used to explain . From the compilation of the program , Connector script , After the program starts, the layout of the program in memory , stack segment , The specific layout of data segments , Finally, stack management and so on , You can see a specific layout image , Instead of abstract memory , Abstract tasks .
We mainly talk about connector scripts and memory layout , Then there are some basic linked list queues and other memory management , The basic data structure used in task scheduling . Then there is stack management , Macro layout in memory . Then there is the lock , Semaphores and so on will be used in task management . Finally, task management and scheduling
official account
Friends who want to understand the principle of the operating system are welcome to follow wechat official account deepcoder, The official account will share knowledge about the operating system , From simplicity to complexity , From lightweight to heavyweight , From single core to multi-core . From kernel state to user state . Lightweight with liteos Take the system as an example to share . Heavyweight with linux Share for example . Each will share memory management , Task scheduling , lock , Semaphore and other core principles of the operating system . Welcome like-minded friends to exchange and study together
边栏推荐
- Basic process of APP testing and key points of APP testing
- Polarion用代码的方式管理需求和测试文档
- IDE 的主题应该用亮色还是暗色?终极答案来了!
- scratch图形化编程操作硬件
- New text document
- Write a program that completely intercepts user operations
- liteos连接器脚本(一)
- 002_ SSSS_ Denoising Diffusion Implicit Models
- Label Embedding Online Hashing for Cross-Modal Retrieval
- 头部标题小竖线制作/LOGO SEO优化
猜你喜欢
Polarion舍与得——主机厂与供应商的ASPICE博弈
全面:Realtek/瑞昱无线产品图谱及市场构成
Using kubekey to build kubernetes/kubesphere environment“
Scientific evidence: does NMN have an effect on cholecystitis, and how about the clinical effect of NMN
JMeter - from getting started to mastering - environment construction (detailed tutorial)
Réponse: Qu'est - ce que l'unit é de concept nmn et qu'est - ce que nmn exactement
Postman核心功能解析-参数化和测试报告
什么是物联网控制系统?它具有哪些特点?
这五款特别的蓝牙芯,哪款最合你应用
Siemens invites you to attend the ALM webinar on July 27
随机推荐
liteos连接器脚本(一)
Do you know how to build data-driven, keyword driven and hybrid selenium framework
Vscode small settings
Armv8 cortex-a programming wizard manual learning_ five
索诺娃Sonova使用 Polarion 将合规性文档时间缩短了 80%
Some superficial research and development stages involve software summarization
Quartz.NET c# 教程 - 课程五:SimpleTrigger
nmn产品真的有其效果吗,服用几个月nmn后有哪些效果
nmn与线粒体的作用,nmn线粒体对细胞作用及影响,值得关注
openGl新手入门学习笔记(一)什么是openGl,使用glfw库和环境搭建
全面:Realtek/瑞昱无线产品图谱及市场构成
002_ SSSS_ Denoising Diffusion Implicit Models
浅聊Matter协议 (原CHIP协议)
Arm V7 kernel notes - General timers and related coprocessors
Armv8 cortex-a programming wizard manual learning_ one
关于对自动化测试的理解:目的与本质!(新手必看)
Polarion舍与得——主机厂与供应商的ASPICE博弈
TS 类 和 ES6 类对比
Jmeter - 从入门到精通 - 环境搭建(详解教程)
Online Enhanced Semantic Hashing: Towards Effective and Efficient Retrieval for Streaming Multi-Moda