1 Star 0 Fork 332

bin.zhang / TencentOS-tiny

forked from 腾讯开源 / TencentOS-tiny 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Apache-2.0

开放原子开源基金会首批孵化项目

license PRs Welcome Build status

(English Documents Available)

一、TencentOS Tiny 简介

TencentOS tiny 是腾讯面向物联网领域开发的实时操作系统,具有低功耗,低资源占用,模块化,安全可靠等特点,可有效提升物联网终端产品开发效率。TencentOS tiny 提供精简的 RTOS 内核,内核组件可裁剪可配置,可快速移植到多种主流 MCU (如 STM32 全系列)及模组芯片上。而且,基于 RTOS 内核提供了丰富的物联网组件,内部集成主流物联网协议栈(如 CoAP/MQTT/TLS/DTLS/LoRaWAN/NB-IoT 等),可助力物联网终端设备及业务快速接入腾讯云物联网平台。

1、TencentOS tiny整体架构

TencentOS tiny 主体架构图,从下到上主要包括:

CPU 库 :TencentOS tiny 支持的 CPU IP 核架构,当前主要支持 ARM Cortex M0/3/4/7,Cortex A7,RISC-V、MSP430、AVR、STM8 等。

驱动管理层 :包括板级支持包(BSP,主要由 MCU 芯片厂家开发与维护)、硬件抽象层(HAL,主要由 TencentOS tiny 提供,方便不同芯片的适配与移植)、设备驱动(Drivers,例如 Wi-Fi、GPRS、LoRa 等模块的驱动程序)。

内核 :TencentOS tiny 实时内核包括任务管理、实时调度、时间管理、中断管理、内存管理、异常处理、软件定时器、链表、消息队列、信号量、互斥锁、事件标志等模块。

IoT 协议栈:TencentOS tiny 提供 lwip、AT Adapter、SAL 层,支持不同的网络硬件,例如以太网、串口 Wi-Fi、GPRS、NB-IoT、4G 等通信模块。TCP/IP 网络协议栈上提供常用的物联网协议栈,例如 CoAP、MQTT,支撑终端业务快速接入腾讯云。

安全框架:TencentOS tiny 为了确保物联网终端数据传输安全以及设备认证安全,提供了完整的安全解决方案。安全框架提供的 DTLS 和 TLS 安全协议,加固了 COAP 及 MQTT 的传输层,可确保物联网终端在对接腾讯云时实现安全认证和数据加密;另外针对低资源的终端硬件,安全框架还提供与腾讯云 IoTHub 配套的密钥认证方案,确保资源受限设备也能在一定程度上实现设备安全认证。

组件框架:TencentOS tiny 提供文件系统、KV 存储、自组网、JS 引擎、低功耗框架、设备框架、OTA、调试工具链等一系列组件,供用户根据业务场景选用。

开放 API(规划开发中):TencentOS tiny 将在协议中间件和框架层上提供开放 API 函数,方便用户调用中间件功能,使用户无需过多关心中间件具体实现,快速对接腾讯云,实现终端业务上云的需求,期望最大程度减少终端物联网产品开发周期,节省开发成本。

示例应用:TencentOS tiny 提供的示例代码,模块测试代码等,方便用户参考使用。

2、TencentOS tiny 优势

(1).小体积

最小内核:RAM 0.6KB,ROM 1.8KB 典型 LoraWAN 及传感器应用:RAM 3.3KB,ROM 12KB

(2).低功耗

休眠最低功耗低至 2uA 支持外设功耗管理框架

(3).丰富的 IoT 组件

集成主流 IoT 协议栈 多种通信模组SAL层适配框架; 支持 OTA 升级 提供简单易用端云 API,加速用户业务接入腾讯云

(4).可靠的安全框架

多样化的安全分级方案 均衡安全需求&成本控制

(5).良好的可移植性

内核及IoT组件高度解耦,提供标准适配层 提供自动化移植工具,提升开发效率

(6).便捷的调试手段

提供云化的最后一屏调试功能 故障现场信息自动上传云平台,方便开发人员调试分析

3、TencentOS tiny携手合作伙伴共建IoT生态

TencentOS tiny 自开源发布以来也在努力发展合作伙伴,期待合作共赢,共同扩展 IoT 应用生态。目前已经与多家 MCU/IP 核厂家达成了合作,包括意法半导体、恩智浦半导体、兆易半导体、ARM、华大半导体、芯来科技等;也与无线 SOC 和模组厂家达成了广泛的合作关系,包括瑞兴恒方、国民技术、Nordic 蓝牙、亮牛半导体、有人物联网等,

除了MCU和模组外,TencentOS tiny 也积极推进终端产品及项目的落地,目前已经形成了AI智慧农业、智能货柜、智慧会议室等方案,并且在腾讯内部与微信支付、腾讯云智慧行业、 AI 平台部、腾讯微瓴、QQ family 达成内部合作,共同扩展行业生态;同时也开始积极发展外部客户,目前与深圳光合显示科技的墨水屏零售标签、鑫悦购充电桩等达成业务合作。TencentOS tiny 将携手合作伙伴为物联网终端厂家提供更优质的 IoT 终端软件解决方案,方便各种物联网设备快速接入腾讯云,共同扩展 IoT 生态,更好地支撑智慧城市、智能水表、智能家居、智能穿戴、车联网等多种行业应用。

欢迎 IoT 相关项目合作,有合作需求的请邮件联系 TencentOS tiny 官方工作人员,邮箱地址 : supowang@tencent.com

二、TencentOS tiny 代码目录

三、TencentOS tiny 参考文档

1、移植指南

2、TencentOS tiny 开发指南

3、TencentOS tiny 腾讯云大学视频教程

四、TencentOS tiny 开源协议

五、TencentOS tiny 支持的物联网平台

TencentOS tiny 能支持物联网终端设备和业务快速接入腾讯云物联网平台 IoT Explorer

TencentOS tiny 结合腾讯云物联网开发平台 IoT Explorer,已经构筑起连接通讯芯片到云开发的能力,加上已经建设完成的国内最大规模 LoRa 网络,腾讯彻底打通从芯片通讯开发、网络支撑服务,物理设备定义管理,数据分析和多场景应用开发等全链条IoT云开发服务能力,重新定义了物联网开发模式,助力亿级设备多方式多模式低门槛接入腾讯云服务。作为物联网基础设施建设服务者,腾讯将持续打造开放的物联网生态体系,促进物联网生态良性发展。

六、TencentOS tiny 快速入门参考

TencentOS tiny 联合合作伙伴(南京厚德物联网)设计了定制开发板,如下图:

七、贡献代码

    1. 在您自己的 GitHub 账户下 Fork TencentOS tiny 开源项目;
    1. 根据您的需求在本地 clone 一份 TencentOS tiny 代码;
    1. 您修改或者新增功能后,push 到您 fork 的远程分支;
    1. 创建 pull request,向 TencentOS tiny 官方开发分支提交合入请求;
    1. TencentOS tiny 研发团队会定期 review 代码,通过测试后合入。

八、加入TencentOS tiny官方QQ技术交流群

扫码加群,请备注 TencentOS tiny 开发者,工作人员会根据备注进行审核:

九、第三方开发者评测

1.基于 TencentOS tiny 的环境监测实战项目 【TencentOS tiny】环境监测实战项目最终完整版 感谢阿正的贡献

2.基于野火 stm32f103 开发板上移植的 TencentOS tiny 例程、源码剖析、视频讲解。 感谢 CSDN 博客专家杰杰的贡献

简单上手:

深度源码分析:

配套例程:

视频教程:

相关PPT资料:

BSD 3-Clause License Tencent is pleased to support the open source community by making TencentOS available. Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. If you have downloaded a copy of the TencentOS binary from Tencent, please note that the TencentOS binary is licensed under the BSD 3-Clause License. If you have downloaded a copy of the TencentOS source code from Tencent, please note that TencentOS source code is licensed under the BSD 3-Clause License, except for the third-party components listed below which are subject to different license terms. Your integration of TencentOS into your own projects may require compliance with the BSD 3-Clause License, as well as the other licenses applicable to the third-party components included within TencentOS. A copy of the BSD 3-Clause License is included in this file. Other dependencies and licenses: Open Source Software Licensed Under the MIT License: 1. spiffs 0.3.7 Copyright (c) 2013-2017 Peter Andersson (pelleplutt1976<at>gmail.com) 2. CmBacktrace 1.2.0 Copyright (c) 2016-2018 Armink (armink.ztl@gmail.com) Terms of the MIT License: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Open Source Software Licensed Under the Apache License, Version 2.0: 1. Mbedtls 2.13.0 Copyright © 2008 - 2016 ARM Limited. All Rights Reserved. 2. CMSIS 5.5.1 Copyright © 1995-2019 Arm Limited (or its affiliates). All rights reserved. Terms of the Apache License, Version 2.0: Apache License

Version 2.0, January 2004

http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. “License” shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. “Licensor” shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. “Legal Entity” shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, “control” means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. “You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by this License. “Source” form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. “Object” form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. “Work” shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). “Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. “Contribution” shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, “submitted” means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as “Not a Contribution.” “Contributor” shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: a) You must give any other recipients of the Work or Derivative Works a copy of this License; and b) You must cause any modified files to carry prominent notices stating that You changed the files; and c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and d) If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Open Source Software Licensed under the Eclipse Distribution License - v 1.0 1. paho.mqtt.embedded-c v1.1.0 Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors. All rights reserved. Terms of the Eclipse Distribution License - v 1.0 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. Neither the name of the Eclipse Foundation, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Open Source Software Licensed Under the BSD-style licenses but there is a significant feature. 1. FATFS R0.13c Copyright (C) 2018, ChaN, all right reserved. Terms of the BSD-style licenses FatFs module is an open source software. Redistribution and use of FatFs in source and binary forms, with or without modification, are permitted provided that the following condition is met: 1. Redistributions of source code must retain the above copyright notice, this condition and the following disclaimer. This software is provided by the copyright holder and contributors "AS IS" and any warranties related to this software are DISCLAIMED. The copyright owner or contributors be NOT LIABLE for any damages caused by use of this software. Therefore FatFs license is one of the BSD-style licenses but there is a significant feature. FatFs is mainly intended for embedded systems. In order to extend the usability for commercial products, the redistributions of FatFs in binary form, such as embedded code, binary library and any forms without source code, does not need to include about FatFs in the documentations. This is equivalent to the 1-clause BSD license. Of course FatFs is compatible with the most of open source software licenses including GNU GPL. When you redistribute the FatFs source code with any changes or create a fork, the license can also be changed to GNU GPL, BSD-style license or any open source software license that not conflict with FatFs license. Open Source Software Licensed Under the BSD 3-Clause License: 1. LWIP 2.0.3 Copyright (c) 2001, 2002 Swedish Institute of Computer Science. All rights reserved. 2. LoRaMac-node 4.4.2-rc.4 Copyright (c) 2013, SEMTECH S.A. All rights reserved. 3. FreeCoAP v0.6 Copyright (c) 2015 - 2017 Keith Cullen 4. mattconte/tlsf v3.1 Copyright (c) 2006-2016 Matthew (Conte matt@baisoku.org) Terms of the BSD 3-Clause License: Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of THL A29 Limited nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

简介

TencentOS tiny 是腾讯面向物联网领域开发的实时操作系统,具有低功耗,低资源占用,模块化,安全可靠等特点,可有效提升物联网终端产品开发效率 展开 收起
C
Apache-2.0
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C
1
https://gitee.com/as807048861/TencentOS-tiny.git
git@gitee.com:as807048861/TencentOS-tiny.git
as807048861
TencentOS-tiny
TencentOS-tiny
master

搜索帮助