1 Star 0 Fork 534

xwxwxw6203 / kernel_liteos_m

forked from RISCV-MCU / kernel_liteos_m 
Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
BSD-3-Clause

LiteOS Cortex-M

Introduction

The OpenHarmony LiteOS Cortex-M is the kernel designed for the lightweight operating system (OS) for the Internet of Things (IoT) field. It features small size, low power consumption, and high performance. In addition, it has a simple code structure, including the minimum kernel function set, kernel abstraction layer, optional components, and project directory, and is divided into the hardware-related and hardware-irrelevant layers. The hardware-related layers provide unified hardware abstraction layer (HAL) interfaces to improve hardware adaptability. The combination and classification of different compilation toolchains and chip architectures meet the requirements of the Artificial Intelligence of Things (AIoT) field for rich hardware and compilation toolchains. Figure1 shows the architecture of the OpenHarmony LiteOS Cortex-M kernel.

Figure 1 Architecture of OpenHarmony the LiteOS Cortex-M kernel

Directory Structure

The directory structure is listed as below, for the detailed directories, please refer to arch_spec.md.

/kernel/liteos_m
├── components           # Optional components
│   ├── backtrace        # Backtrace support
│   ├── cppsupport       # C++ support
│   ├── cpup             # CPU possession (CPUP)
│   ├── dynlink          # Dynamic loader & linker
│   ├── exchook          # Exception hook
│   ├── fs               # File system
│   └── net              # Network support
├── kal                  # Kernel abstraction layer
│   ├── cmsis            # CMSIS-compliant API support
│   └── posix            # POSIX API support
├── kernel               # Minimum function set support
│   ├── arch             # Code of the kernel instruction architecture layer
│   │   ├── arm          # Code of the ARM32 architecture
│   │   └── include      # APIs exposed externally
│   ├── include          # APIs exposed externally
│   └── src              # Source code of the minimum function set of the kernel
├── targets              # Board-level projects
├── utils                # Common code

Constraints

Programming languages: C and C++

Currently applicable architectures: Cortex-M3, Cortex-M4, Cortex-M7, and RISC-V

Usage

LiteOS Cortex-M provides projects for three chip architectures, which are located in the targets directory. The methods of compiling and using these projects are as follows:

  • Cortex-M3:

The kernel/liteos_m/targets/cortex-m3_stm32f103_simulator_keil directory is the Keil project directory created based on the STM32F103 chip architecture. You can download and install Keil development tools from the Internet. To compile the Cortex-M3 project, go to the cortex-m3_stm32f103_simulator_keil/project directory and double-click the los_demo.uvproj file to open the desired project. After the compilation is successful, burn the file to the corresponding board using JLINK or STM32 ST-LINK Utility.

  • Cortex-M4:

The kernel/liteos_m/targets/cortex-m4_stm32f429ig_fire-challenger_iar directory is the IAR project directory created based on the STM32F429IG chip architecture. You can download and install IAR development tools from the Internet. To compile the Cortex-M4 project, go to the cortex-m4_stm32f429ig_fire-challenger_iar/project directory and double-click the los_demo.eww file to open the desired project. After the compilation is successful, burn the file to the corresponding board using JLINK or STM32 ST-LINK Utility.

  • Cortex-M7:

The kernel/liteos_m/targets/cortex-m7_nucleo_f767zi_gcc directory is the Makefile project directory created based on the STM32F767ZI chip architecture. The compilation commands are as follows:

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

After the compilation is successful, the executable file NUCLEO-F767.hex is generated in the cortex-m7_nucleo_f767zi_gcc/build directory. Burn the file to the corresponding board using STM32 ST-LINK Utility.

Repositories Involved

Kernel subsystem

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.

About

LiteOS kernel for devices with few resources, such as the MCU | 适用于MCU等各种资源极小设备的LiteOS内核 expand collapse
C
BSD-3-Clause
Cancel

Releases

No release

Contributors

All

Activities

Load More
can not load any more
C
1
https://gitee.com/xwxwxw6203/kernel_liteos_m.git
git@gitee.com:xwxwxw6203/kernel_liteos_m.git
xwxwxw6203
kernel_liteos_m
kernel_liteos_m
nuclei/OpenHarmony-3.0-LTS

Search