1 Star 0 Fork 532

君若兮 / kernel_liteos_m

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

LiteOS-M内核

简介

OpenHarmony LiteOS-M内核是面向IoT领域构建的轻量级物联网操作系统内核,具有小体积、低功耗、高性能的特点,其代码结构简单,主要包括内核最小功能集、内核抽象层、可选组件以及工程目录等,分为硬件相关层以及硬件无关层,硬件相关层提供统一的HAL(Hardware Abstraction Layer)接口,提升硬件易适配性,不同编译工具链和芯片架构的组合分类,满足AIoT类型丰富的硬件和编译工具链的拓展。其架构图如图1所示:

图 1 OpenHarmony LiteOS-M核内核架构图

目录

/kernel/liteos_m
├── components           # 可选组件
│   ├── cppsupport       # C++支持
│   └── cpup             # CPUP功能
├── kal                  # 内核抽象层
│   ├── cmsis            # cmsis标准接口支持
│   └── posix            # posix标准接口支持
├── kernel               # 内核最小功能集支持
│   ├── arch             # 内核指令架构层代码
│   │   ├── arm          # arm32架构的代码
│   │   └── include      # 对外接口存放目录
│   ├── include          # 对外接口存放目录
│   └── src              # 内核最小功能集源码
├── targets              # 板级工程目录
├── utils                # 通用公共目录

约束

开发语言:C/C++;

适用架构:当前只适用于cortex-m3、cortex-m4、cortex-m7、risc-v芯片架构。

使用说明

LiteOS-M内核提供了三种芯片架构的工程位于targets目录。三种架构的工程编译及使用方式如下:

  • cortex-m3:

kernel/liteos_m/targets/cortex-m3_stm32f103_simulator_keil目录是基于STM32F103芯片架构构建的keil工程目录,keil开发工具可通过网络下载并安装。进入cortex-m3_stm32f103_simulator_keil/project目录,双击los_demo.uvproj文件即可打开相应工程,编译成功后即可通过JLINK或者STM32 ST-LINK Utility烧录至对应单板。

  • cortex-m4:

kernel/liteos_m/targets/cortex-m4_stm32f429ig_fire-challenger_iar目录是基于STM32F429IG芯片架构构建的IAR工程目录,IAR开发工具可通过网络下载并安装。进入cortex-m4_stm32f429ig_fire-challenger_iar/project目录,双击los_demo.eww文件即可打开相应工程,编译成功后即可通过JLINK或者STM32 ST-LINK Utility烧录至对应单板。

  • cortex-m7:

kernel/liteos_m/targets/cortex-m7_nucleo_f767zi_gcc目录是基于STM32F767ZI芯片架构构建的Makefile工程目录。编译方式如下:

cd kernel/liteos_m/targets/cortex-m7_nucleo_f767zi_gcc
make clean; make

编译成功后在cortex-m7_nucleo_f767zi_gcc/build目录下生成NUCLEO-F767.hex可执行文件,通过烧录工具STM32 ST-LINK Utility烧录到对应的单板。

修改日志

v1.0.1

  1. 删除以下KAL接口: KalThreadGetInfo,KalDelayUs,KalTimerCreate,KalTimerStart,KalTimerChange,KalTimerStop,KalTimerDelete,KalTimerIsRunning,KalTickToMs,KalMsToTick,KalGetMemInfo
  2. 添加部分POSIX接口

v1.0

  1. 首次发布

相关仓

内核子系统

kernel_liteos_m

Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. 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 the copyright holder 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.

简介

LiteOS kernel for devices with few resources, such as the MCU | 适用于MCU等各种资源极小设备的LiteOS内核 展开 收起
C
BSD-3-Clause
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C
1
https://gitee.com/junruoxi/kernel_liteos_m.git
git@gitee.com:junruoxi/kernel_liteos_m.git
junruoxi
kernel_liteos_m
kernel_liteos_m
master

搜索帮助