From cf439885234e0955bab09834b3b876d627c81605 Mon Sep 17 00:00:00 2001
From: rtos_shang <614371500@qq.com>
Date: Fri, 21 May 2021 11:33:24 +0800
Subject: [PATCH 1/6] fix: update arch_spec.md
update arch_spec.md, add Chinese edition of arch_spec_zh.md and add link to readme files
close https://gitee.com/openharmony/kernel_liteos_m/issues/I3QQ93 https://gitee.com/openharmony/kernel_liteos_m/issues/I3J7RS
---
README.md | 8 ++++-
README_zh.md | 8 ++++-
arch_spec.md | 90 +++++++++++++++++++++++++++++++------------------
arch_spec_zh.md | 76 +++++++++++++++++++++++++++++++++++++++++
4 files changed, 147 insertions(+), 35 deletions(-)
create mode 100644 arch_spec_zh.md
diff --git a/README.md b/README.md
index a3d1d4ca..b024ee82 100644
--- a/README.md
+++ b/README.md
@@ -15,11 +15,17 @@ The OpenHarmony LiteOS Cortex-M is the kernel designed for the lightweight opera
## Directory Structure
+The directory structure is listed as below, for the detailed directories, please refer to [arch_spec.md](https://gitee.com/openharmony/kernel_liteos_m/blob/master/arch_spec.md).
+
```
/kernel/liteos_m
├── components # Optional components
+│ ├── backtrace # backtrace support
│ ├── cppsupport # C++ support
-│ └── cpup # CPU possession (CPUP)
+│ ├── cpup # CPU possession (CPUP)
+│ ├── exchook # Exception hook
+│ ├── fs # File system
+│ └── net # Network support
├── kal # Kernel abstraction layer
│ ├── cmsis # CMSIS-compliant API support
│ └── posix # POSIX API support
diff --git a/README_zh.md b/README_zh.md
index 9e9e8489..f3db5440 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -15,11 +15,17 @@ OpenHarmony LiteOS-M内核是面向IoT领域构建的轻量级物联网操作系
## 目录
+目录结构如下,详细目录请参考[arch_spec_zh.md](https://gitee.com/openharmony/kernel_liteos_m/blob/master/arch_spec_zh.md)。
+
```
/kernel/liteos_m
├── components # 可选组件
+│ ├── backtrace # 回溯栈支持
│ ├── cppsupport # C++支持
-│ └── cpup # CPUP功能
+│ ├── cpup # CPUP功能
+│ ├── exchook # 异常钩子
+│ ├── fs # 文件系统
+│ └── net # Network功能
├── kal # 内核抽象层
│ ├── cmsis # cmsis标准接口支持
│ └── posix # posix标准接口支持
diff --git a/arch_spec.md b/arch_spec.md
index 2ce739e4..e125e0bd 100644
--- a/arch_spec.md
+++ b/arch_spec.md
@@ -1,52 +1,76 @@
```
.
-├── components --- Optional components
+├── components --- Components available for porting and header files exposed externally
+│ ├── backtrace --- Backtrace
│ ├── cppsupport --- C++
-│ └── cpup --- CPUP
-├── kal --- Kernel Abstraction Layer
-│ ├── cmsis --- cmsis
+│ ├── cpup --- CPUP
+│ ├── exchook --- Exception hook
+│ ├── fs --- File System
+│ └── net --- Network
+├── kal --- Kernel Abstraction Layer, APIs exposed externally, including CMSIS APIs and part of POSIX APIs
+│ ├── cmsis --- CMSIS
│ └── posix --- posix
-├── kernel --- Minimalistic kernel funtionalities
-│ ├── arch --- Support for hardware architectures
-│ │ ├── arm --- arm32
-│ │ │ └── cortex-m4 --- cortex-m4
-│ │ │ └── iar
-│ │ │ ├── los_atomic.h
-│ │ │ ├── los_context.h
-│ │ │ ├── los_interrupt.h
-│ │ │ └── los_mpu.h
+├── kernel --- Code for defining the minimum kernel function set
+│ ├── arch --- Code of the kernel instruction architecture layer
+│ │ ├── arm --- ARM32 architecture
+│ │ │ ├── cortex-m3 --- cortex-m3 architecture
+│ │ │ │ └── keil --- Implementation of the Keil toolchain
+│ │ │ ├── cortex-m33 --- cortex-m33 architecture
+│ │ │ │ │── gcc --- Implementation of the GCC toolchain
+│ │ │ │ └── iar --- Implementation of the IAR toolchain
+│ │ │ └── cortex-m4 --- cortex-m4 architecture
+│ │ │ │ │── gcc --- Implementation of the GCC toolchain
+│ │ │ │ └── iar --- Implementation of the IAR toolchain
+│ │ │ └── cortex-m7 --- cortex-m7 architecture
+│ │ │ │ │── gcc --- Implementation of the GCC toolchain
+│ │ │ │ └── iar --- Implementation of the IAR toolchain
+│ │ ├── risc-v --- risc-v architecture
+│ │ │ ├── nuclei --- nuclei architecture
+│ │ │ │ └── gcc --- Implementation of the GCC toolchain
+│ │ │ └── riscv32 --- riscv32 architecture
+│ │ │ │ └── gcc --- Implementation of the GCC toolchain
│ │ └── include
-│ │ ├── los_arch_atomic.h --- Atomic operations
-│ │ ├── los_arch_context.h --- Context switch
│ │ ├── los_arch.h --- Initialization
-│ │ └── los_arch_interrupt.h --- Interrupts
+│ │ ├── los_atomic.h --- Atomic operations
+│ │ ├── los_context.h --- Context switch
+│ │ ├── los_interrupt.h --- Interrupts
+│ │ ├── los_mpu.h --- Memory protection unit operations
+│ │ └── los_timer.h --- Timer operations
│ ├── include
│ │ ├── los_config.h --- Configuration parameters
│ │ ├── los_event.h --- Events management
-│ │ ├── los_liteos.h --- Kernel types and functions
+│ │ ├── los_membox.h --- Membox management
│ │ ├── los_memory.h --- Heap memory management
-│ │ ├── los_mutex.h --- Mutex
+│ │ ├── los_mux.h --- Mutex
│ │ ├── los_queue.h --- Queue
-│ │ ├── los_scheduler.h --- Scheduler
+│ │ ├── los_sched.h --- Scheduler
│ │ ├── los_sem.h --- Semaphores
+│ │ ├── los_sortlink.h --- Sort link
+│ │ ├── los_swtmr.h --- Timer
│ │ ├── los_task.h --- Tasks
-│ │ └── los_timer.h --- Timer
+│ │ └── los_tick.h --- Tick
│ └── src
├── targets
│ └── targets
-│ └── cortex-m4_stm32f429ig_fire-challenger_iar
-│ ├── board
-│ ├── dprintf.c
-│ ├── Libraries
-│ ├── main.c
-│ ├── project
-│ ├── target_config.h --- Hardware target configuration
-│ └── Utilities
+│ └── riscv_nuclei_demo_soc_gcc
+│ │ ├── GCC --- compilation config
+│ │ ├── OS_CONFIG --- board config
+│ │ ├── SoC --- SOC codes
+│ │ └── Src --- application codes
+│ └── riscv_nuclei_gd32vf103_soc_gcc
+│ └── riscv_sifive_fe310_gcc
└── utils
- ├── include
- │ ├── los_compiler.h --- Compiler configuration
- │ ├── los_debug.h --- Debugging facilities
- │ ├── los_error.h --- Errors codes and definitions
- │ └── los_list.h
+ ├── internal
+ ├── BUILD.gn --- gn build config file
+ ├── los_compiler.h --- Compiler configuration
+ ├── los_debug.c --- Debugging facilities
+ ├── los_debug.h
+ ├── los_error.c --- Errors codes and definitions
+ ├── los_error.h
+ ├── los_hook.c --- Hook function facilities
+ ├── los_hook.h
+ ├── los_list.h --- Doubly linked list
+ └── los_reg.h --- Register macros
└── src
```
+
diff --git a/arch_spec_zh.md b/arch_spec_zh.md
new file mode 100644
index 00000000..53922224
--- /dev/null
+++ b/arch_spec_zh.md
@@ -0,0 +1,76 @@
+```
+.
+├── components --- 移植可选组件,依赖内核,单独对外提供头文件
+│ ├── backtrace --- 回溯栈支持
+│ ├── cppsupport --- C++支持
+│ ├── cpup --- CPUP功能
+│ ├── exchook --- 异常钩子
+│ ├── fs --- 文件系统
+│ └── net --- 网络功能
+├── kal --- 内核抽象层,提供内核对外接口,当前支持CMSIS接口和部分POSIX接口
+│ ├── cmsis --- CMSIS标准支持
+│ └── posix --- POSIX标准支持
+├── kernel --- 内核最小功能集代码
+│ ├── arch --- 内核指令架构层代码
+│ │ ├── arm --- arm32架构
+│ │ │ ├── cortex-m3 --- cortex-m3架构
+│ │ │ │ └── keil --- Keil编译工具链实现
+│ │ │ ├── cortex-m33 --- cortex-m33架构
+│ │ │ │ │── gcc --- GCC编译工具链实现
+│ │ │ │ └── iar --- IAR编译工具链实现
+│ │ │ └── cortex-m4 --- cortex-m4架构
+│ │ │ │ │── gcc --- GCC编译工具链实现
+│ │ │ │ └── iar --- IAR编译工具链实现
+│ │ │ └── cortex-m7 --- cortex-m7架构
+│ │ │ │ │── gcc --- GCC编译工具链实现
+│ │ │ │ └── iar --- IAR编译工具链实现
+│ │ ├── risc-v --- risc-v架构
+│ │ │ ├── nuclei --- nuclei架构
+│ │ │ │ └── gcc --- GCC编译工具链实现
+│ │ │ └── riscv32 --- riscv32架构
+│ │ │ │ └── gcc --- GCC编译工具链实现
+│ │ └── include
+│ │ ├── los_arch.h --- 定义arch初始化
+│ │ ├── los_atomic.h --- 定义通用arch原子操作
+│ │ ├── los_context.h --- 定义通用arch上下文切换
+│ │ ├── los_interrupt.h --- 定义通用arch中断
+│ │ ├── los_mpu.h --- 定义通用arch内存保护
+│ │ └── los_timer.h --- 定义通用arch定时器
+│ ├── include
+│ │ ├── los_config.h --- 功能开关和配置参数
+│ │ ├── los_event.h --- 事件
+│ │ ├── los_membox.h --- 静态内存管理
+│ │ ├── los_memory.h --- 动态内存管理
+│ │ ├── los_mux.h --- 互斥锁
+│ │ ├── los_queue.h --- 队列
+│ │ ├── los_sched.h --- 调度算法
+│ │ ├── los_sem.h --- 信号量
+│ │ ├── los_sortlink.h --- 排序链表
+│ │ ├── los_swtmr.h --- 定时器
+│ │ ├── los_task.h --- 任务
+│ │ └── los_tick.h --- Tick时钟
+ └── src
+├── targets
+│ └── targets
+│ └── riscv_nuclei_demo_soc_gcc
+│ │ ├── GCC --- 编译相关
+│ │ ├── OS_CONFIG --- 开发板配置功能开关和配置参数
+│ │ ├── SoC --- SOC相关代码
+│ │ └── Src ---application相关代码
+│ └── riscv_nuclei_gd32vf103_soc_gcc
+│ └── riscv_sifive_fe310_gcc
+└── utils
+ ├── internal
+ ├── BUILD.gn --- gn构建文件
+ ├── los_compiler.h --- 编译工具配置,类型定义
+ ├── los_debug.c --- debug,printf相关
+ ├── los_debug.h
+ ├── los_error.c --- 错误处理
+ ├── los_error.h
+ ├── los_hook.c --- 钩子函数注册和调用
+ ├── los_hook.h
+ ├── los_list.h --- 双向链表
+ └── los_reg.h --- 寄存器读写宏定义
+ └── src
+```
+
From 0752400a10ccb143bcb7028ffa52714403535fd3 Mon Sep 17 00:00:00 2001
From: rtos_shang <614371500@qq.com>
Date: Tue, 25 May 2021 10:08:42 +0800
Subject: [PATCH 2/6] change according to review comments
---
README.md | 4 ++--
README_zh.md | 2 +-
arch_spec.md | 24 ++++++++++++------------
arch_spec_zh.md | 22 +++++++++++-----------
4 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/README.md b/README.md
index b024ee82..72d7fc2c 100644
--- a/README.md
+++ b/README.md
@@ -15,12 +15,12 @@ The OpenHarmony LiteOS Cortex-M is the kernel designed for the lightweight opera
## Directory Structure
-The directory structure is listed as below, for the detailed directories, please refer to [arch_spec.md](https://gitee.com/openharmony/kernel_liteos_m/blob/master/arch_spec.md).
+The directory structure is listed as below, for the detailed directories, please refer to [arch_spec.md](arch_spec.md).
```
/kernel/liteos_m
├── components # Optional components
-│ ├── backtrace # backtrace support
+│ ├── backtrace # Backtrace support
│ ├── cppsupport # C++ support
│ ├── cpup # CPU possession (CPUP)
│ ├── exchook # Exception hook
diff --git a/README_zh.md b/README_zh.md
index f3db5440..0cb36dfa 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -15,7 +15,7 @@ OpenHarmony LiteOS-M内核是面向IoT领域构建的轻量级物联网操作系
## 目录
-目录结构如下,详细目录请参考[arch_spec_zh.md](https://gitee.com/openharmony/kernel_liteos_m/blob/master/arch_spec_zh.md)。
+目录结构如下,详细目录请参考[arch_spec_zh.md](arch_spec_zh.md)。
```
/kernel/liteos_m
diff --git a/arch_spec.md b/arch_spec.md
index e125e0bd..a7a024b6 100644
--- a/arch_spec.md
+++ b/arch_spec.md
@@ -9,25 +9,25 @@
│ └── net --- Network
├── kal --- Kernel Abstraction Layer, APIs exposed externally, including CMSIS APIs and part of POSIX APIs
│ ├── cmsis --- CMSIS
-│ └── posix --- posix
+│ └── posix --- POSIX
├── kernel --- Code for defining the minimum kernel function set
│ ├── arch --- Code of the kernel instruction architecture layer
│ │ ├── arm --- ARM32 architecture
-│ │ │ ├── cortex-m3 --- cortex-m3 architecture
+│ │ │ ├── cortex-m3 --- Cortex-m3 architecture
│ │ │ │ └── keil --- Implementation of the Keil toolchain
-│ │ │ ├── cortex-m33 --- cortex-m33 architecture
+│ │ │ ├── cortex-m33 --- Cortex-m33 architecture
│ │ │ │ │── gcc --- Implementation of the GCC toolchain
│ │ │ │ └── iar --- Implementation of the IAR toolchain
-│ │ │ └── cortex-m4 --- cortex-m4 architecture
+│ │ │ └── cortex-m4 --- Cortex-m4 architecture
│ │ │ │ │── gcc --- Implementation of the GCC toolchain
│ │ │ │ └── iar --- Implementation of the IAR toolchain
-│ │ │ └── cortex-m7 --- cortex-m7 architecture
+│ │ │ └── cortex-m7 --- Cortex-m7 architecture
│ │ │ │ │── gcc --- Implementation of the GCC toolchain
│ │ │ │ └── iar --- Implementation of the IAR toolchain
-│ │ ├── risc-v --- risc-v architecture
-│ │ │ ├── nuclei --- nuclei architecture
+│ │ ├── risc-v --- Risc-v architecture
+│ │ │ ├── nuclei --- Nuclei architecture
│ │ │ │ └── gcc --- Implementation of the GCC toolchain
-│ │ │ └── riscv32 --- riscv32 architecture
+│ │ │ └── riscv32 --- Riscv32 architecture
│ │ │ │ └── gcc --- Implementation of the GCC toolchain
│ │ └── include
│ │ ├── los_arch.h --- Initialization
@@ -53,15 +53,15 @@
├── targets
│ └── targets
│ └── riscv_nuclei_demo_soc_gcc
-│ │ ├── GCC --- compilation config
-│ │ ├── OS_CONFIG --- board config
+│ │ ├── GCC --- Compilation config
+│ │ ├── OS_CONFIG --- Board config
│ │ ├── SoC --- SOC codes
-│ │ └── Src --- application codes
+│ │ └── Src --- Application codes
│ └── riscv_nuclei_gd32vf103_soc_gcc
│ └── riscv_sifive_fe310_gcc
└── utils
├── internal
- ├── BUILD.gn --- gn build config file
+ ├── BUILD.gn --- Gn build config file
├── los_compiler.h --- Compiler configuration
├── los_debug.c --- Debugging facilities
├── los_debug.h
diff --git a/arch_spec_zh.md b/arch_spec_zh.md
index 53922224..99a4e535 100644
--- a/arch_spec_zh.md
+++ b/arch_spec_zh.md
@@ -12,22 +12,22 @@
│ └── posix --- POSIX标准支持
├── kernel --- 内核最小功能集代码
│ ├── arch --- 内核指令架构层代码
-│ │ ├── arm --- arm32架构
-│ │ │ ├── cortex-m3 --- cortex-m3架构
+│ │ ├── arm --- ARM32架构
+│ │ │ ├── cortex-m3 --- Cortex-m3架构
│ │ │ │ └── keil --- Keil编译工具链实现
-│ │ │ ├── cortex-m33 --- cortex-m33架构
+│ │ │ ├── cortex-m33 --- Cortex-m33架构
│ │ │ │ │── gcc --- GCC编译工具链实现
│ │ │ │ └── iar --- IAR编译工具链实现
-│ │ │ └── cortex-m4 --- cortex-m4架构
+│ │ │ └── cortex-m4 --- Cortex-m4架构
│ │ │ │ │── gcc --- GCC编译工具链实现
│ │ │ │ └── iar --- IAR编译工具链实现
-│ │ │ └── cortex-m7 --- cortex-m7架构
+│ │ │ └── cortex-m7 --- Cortex-m7架构
│ │ │ │ │── gcc --- GCC编译工具链实现
│ │ │ │ └── iar --- IAR编译工具链实现
-│ │ ├── risc-v --- risc-v架构
-│ │ │ ├── nuclei --- nuclei架构
+│ │ ├── risc-v --- Risc-v架构
+│ │ │ ├── nuclei --- Nuclei架构
│ │ │ │ └── gcc --- GCC编译工具链实现
-│ │ │ └── riscv32 --- riscv32架构
+│ │ │ └── riscv32 --- Riscv32架构
│ │ │ │ └── gcc --- GCC编译工具链实现
│ │ └── include
│ │ ├── los_arch.h --- 定义arch初始化
@@ -56,14 +56,14 @@
│ │ ├── GCC --- 编译相关
│ │ ├── OS_CONFIG --- 开发板配置功能开关和配置参数
│ │ ├── SoC --- SOC相关代码
-│ │ └── Src ---application相关代码
+│ │ └── Src --- Application相关代码
│ └── riscv_nuclei_gd32vf103_soc_gcc
│ └── riscv_sifive_fe310_gcc
└── utils
├── internal
- ├── BUILD.gn --- gn构建文件
+ ├── BUILD.gn --- Gn构建文件
├── los_compiler.h --- 编译工具配置,类型定义
- ├── los_debug.c --- debug,printf相关
+ ├── los_debug.c --- Debug,printf相关
├── los_debug.h
├── los_error.c --- 错误处理
├── los_error.h
From 2a2ef7d7089effb8385d8340979b47421b6d7a70 Mon Sep 17 00:00:00 2001
From: rtos_shang <614371500@qq.com>
Date: Tue, 25 May 2021 10:12:19 +0800
Subject: [PATCH 3/6] change according to comments
---
arch_spec.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch_spec.md b/arch_spec.md
index a7a024b6..b7ae40e1 100644
--- a/arch_spec.md
+++ b/arch_spec.md
@@ -30,7 +30,7 @@
│ │ │ └── riscv32 --- Riscv32 architecture
│ │ │ │ └── gcc --- Implementation of the GCC toolchain
│ │ └── include
-│ │ ├── los_arch.h --- Initialization
+│ │ ├── los_arch.h --- Arch initialization
│ │ ├── los_atomic.h --- Atomic operations
│ │ ├── los_context.h --- Context switch
│ │ ├── los_interrupt.h --- Interrupts
From 2d9bbd2769e71e7b464bd22fc335999dd8000682 Mon Sep 17 00:00:00 2001
From: arvinzzz
Date: Wed, 2 Jun 2021 11:07:59 +0800
Subject: [PATCH 4/6] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=B8=8D=E8=A7=84?=
=?UTF-8?q?=E8=8C=83=E7=9A=84copyright=20close:=20#I3SPJ1=20Change-Id:=20I?=
=?UTF-8?q?6cb01024ef342a0190f5dc9f6cb3a1e815692832?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: arvinzzz
Change-Id: I45c63592b08d29587778209de6af17f932dc86d0
---
BUILD.gn | 4 ++--
components/backtrace/BUILD.gn | 4 ++--
components/cppsupport/BUILD.gn | 4 ++--
components/cpup/BUILD.gn | 4 ++--
components/exchook/BUILD.gn | 4 ++--
components/fs/BUILD.gn | 4 ++--
components/fs/fatfs/BUILD.gn | 4 ++--
components/fs/littlefs/BUILD.gn | 4 ++--
kal/BUILD.gn | 4 ++--
kal/cmsis/BUILD.gn | 4 ++--
kal/posix/BUILD.gn | 4 ++--
kernel/BUILD.gn | 4 ++--
kernel/arch/arm/cortex-m33/gcc/BUILD.gn | 4 ++--
kernel/arch/arm/cortex-m4/gcc/BUILD.gn | 4 ++--
kernel/arch/arm/cortex-m4/gcc/los_exc.S | 2 +-
kernel/arch/arm/cortex-m7/gcc/BUILD.gn | 4 ++--
kernel/arch/risc-v/riscv32/gcc/BUILD.gn | 4 ++--
utils/BUILD.gn | 4 ++--
18 files changed, 35 insertions(+), 35 deletions(-)
diff --git a/BUILD.gn b/BUILD.gn
index b8304d45..18aee987 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/components/backtrace/BUILD.gn b/components/backtrace/BUILD.gn
index 9d1dc2b1..22e3a48d 100644
--- a/components/backtrace/BUILD.gn
+++ b/components/backtrace/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/components/cppsupport/BUILD.gn b/components/cppsupport/BUILD.gn
index 2cb08a28..497ec40c 100644
--- a/components/cppsupport/BUILD.gn
+++ b/components/cppsupport/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/components/cpup/BUILD.gn b/components/cpup/BUILD.gn
index bec51891..cd5693b0 100644
--- a/components/cpup/BUILD.gn
+++ b/components/cpup/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/components/exchook/BUILD.gn b/components/exchook/BUILD.gn
index fc93d9de..bbd45a1b 100644
--- a/components/exchook/BUILD.gn
+++ b/components/exchook/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/components/fs/BUILD.gn b/components/fs/BUILD.gn
index 7a7401c4..1173aa9f 100644
--- a/components/fs/BUILD.gn
+++ b/components/fs/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/components/fs/fatfs/BUILD.gn b/components/fs/fatfs/BUILD.gn
index 411fdf32..7be3db52 100644
--- a/components/fs/fatfs/BUILD.gn
+++ b/components/fs/fatfs/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/components/fs/littlefs/BUILD.gn b/components/fs/littlefs/BUILD.gn
index f3d8c9ea..fbd76cc6 100644
--- a/components/fs/littlefs/BUILD.gn
+++ b/components/fs/littlefs/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/kal/BUILD.gn b/kal/BUILD.gn
index 97dc7381..da59f5a6 100644
--- a/kal/BUILD.gn
+++ b/kal/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/kal/cmsis/BUILD.gn b/kal/cmsis/BUILD.gn
index 861efb9f..4b6516f9 100644
--- a/kal/cmsis/BUILD.gn
+++ b/kal/cmsis/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/kal/posix/BUILD.gn b/kal/posix/BUILD.gn
index cc8d577b..c3e8235c 100644
--- a/kal/posix/BUILD.gn
+++ b/kal/posix/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/kernel/BUILD.gn b/kernel/BUILD.gn
index 742da8b1..0eb0b54c 100644
--- a/kernel/BUILD.gn
+++ b/kernel/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/kernel/arch/arm/cortex-m33/gcc/BUILD.gn b/kernel/arch/arm/cortex-m33/gcc/BUILD.gn
index ccda24e2..9e6f08d1 100644
--- a/kernel/arch/arm/cortex-m33/gcc/BUILD.gn
+++ b/kernel/arch/arm/cortex-m33/gcc/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/kernel/arch/arm/cortex-m4/gcc/BUILD.gn b/kernel/arch/arm/cortex-m4/gcc/BUILD.gn
index 0f6717a0..01757ea5 100644
--- a/kernel/arch/arm/cortex-m4/gcc/BUILD.gn
+++ b/kernel/arch/arm/cortex-m4/gcc/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/kernel/arch/arm/cortex-m4/gcc/los_exc.S b/kernel/arch/arm/cortex-m4/gcc/los_exc.S
index cfdf0fac..b2106500 100644
--- a/kernel/arch/arm/cortex-m4/gcc/los_exc.S
+++ b/kernel/arch/arm/cortex-m4/gcc/los_exc.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
+ * 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,
diff --git a/kernel/arch/arm/cortex-m7/gcc/BUILD.gn b/kernel/arch/arm/cortex-m7/gcc/BUILD.gn
index ccda24e2..9e6f08d1 100644
--- a/kernel/arch/arm/cortex-m7/gcc/BUILD.gn
+++ b/kernel/arch/arm/cortex-m7/gcc/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/kernel/arch/risc-v/riscv32/gcc/BUILD.gn b/kernel/arch/risc-v/riscv32/gcc/BUILD.gn
index 3bd1a1d2..709a08e6 100644
--- a/kernel/arch/risc-v/riscv32/gcc/BUILD.gn
+++ b/kernel/arch/risc-v/riscv32/gcc/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
diff --git a/utils/BUILD.gn b/utils/BUILD.gn
index 202eab8a..f23ddc0c 100644
--- a/utils/BUILD.gn
+++ b/utils/BUILD.gn
@@ -1,5 +1,5 @@
-# Copyright (c) 2013-2019, Huawei Technologies Co., Ltd. All rights reserved.
-# Copyright (c) 2020-2021, Huawei Device Co., Ltd. All rights reserved.
+# 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:
From 9e332c69a5813027575786424b78f0ae2f9a4c5a Mon Sep 17 00:00:00 2001
From: kenneth <459864689@qq.com>
Date: Wed, 2 Jun 2021 15:37:34 +0800
Subject: [PATCH 5/6] fix: fix readme link issue
update links to docs
close https://gitee.com/openharmony/kernel_liteos_m/issues/I3TX4Q
Signed-off-by: kenneth <459864689@qq.com>
---
README_zh.md | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/README_zh.md b/README_zh.md
index 9e9e8489..6dc55bac 100644
--- a/README_zh.md
+++ b/README_zh.md
@@ -41,11 +41,11 @@ OpenHarmony LiteOS-M内核是面向IoT领域构建的轻量级物联网操作系
## 使用说明
-OpenHarmony LiteOS-M内核的编译构建系统是一个基于gn和ninja的组件化构建系统,支持按组件配置、裁剪和拼装,按需构建出定制化的产品。编译构建系统的详细信息可以参考[官方开源站点编译系统介绍](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/porting/%E7%BC%96%E8%AF%91%E7%B3%BB%E7%BB%9F%E4%BB%8B%E7%BB%8D.md)。本文主要介绍如何基于gn和ninja编译LiteOS-M工程,GCC+Makefile、IAR、Keil MDK等编译方式可以参考社区爱好者贡献的站点。
+OpenHarmony LiteOS-M内核的编译构建系统是一个基于gn和ninja的组件化构建系统,支持按组件配置、裁剪和拼装,按需构建出定制化的产品。编译构建系统的详细信息可以参考[轻量和小型系统编译构建指导](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/subsystems/%E8%BD%BB%E9%87%8F%E5%92%8C%E5%B0%8F%E5%9E%8B%E7%B3%BB%E7%BB%9F%E7%BC%96%E8%AF%91%E6%9E%84%E5%BB%BA%E6%8C%87%E5%AF%BC.md)。本文主要介绍如何基于gn和ninja编译LiteOS-M工程,GCC+Makefile、IAR、Keil MDK等编译方式可以参考社区爱好者贡献的站点。
### 搭建系统基础环境
-在搭建各个开发板环境前,需要完成OpenHarmony系统基础环境搭建。系统基础环境主要是指OpenHarmony的编译环境和开发环境,详细介绍请参考官方站点[搭建系统基础环境](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/%E6%90%AD%E5%BB%BA%E7%B3%BB%E7%BB%9F%E5%9F%BA%E7%A1%80%E7%8E%AF%E5%A2%83.md)。开发者需要根据环境搭建文档,完成下述软件的安装:Python3.7+、gn、ninja、hb。对于LiteOS-M内核,还需要安装Make构建工具和[ARM GCC编译工具链](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)。
+在搭建各个开发板环境前,需要完成OpenHarmony系统基础环境搭建。系统基础环境主要是指OpenHarmony的编译环境和开发环境,详细介绍请参考官方站点[Ubuntu编译环境准备](https://gitee.com/openharmony/docs/blob/master/zh-cn/device-dev/quick-start/Ubuntu%E7%BC%96%E8%AF%91%E7%8E%AF%E5%A2%83%E5%87%86%E5%A4%87.md)。开发者需要根据环境搭建文档,完成下述软件的安装:Python3.7+、gn、ninja、hb。对于LiteOS-M内核,还需要安装Make构建工具和[ARM GCC编译工具链](https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads)。
### 获取OpenHarmony源码
@@ -62,6 +62,8 @@ git clone https://gitee.com/harylee/nucleo_f767zi.git
假设克隆到的代码目录为`~/nucleo_f767zi`。 执行如下命令把代码目录的`device`、`vendor`目录复制到`openHarmony`工程的相应目录。
```
+mkdir ~/openHarmony/device/st
+
cp -r ~/nucleo_f767zi/device/st/nucleo_f767zi ~/openHarmony/device/st/nucleo_f767zi
chmod +x ~/openHarmony/device/st/nucleo_f767zi/build.sh
From a5f4e37e535bff39a333c469e2f1bf1817216fe8 Mon Sep 17 00:00:00 2001
From: arvinzzz
Date: Wed, 2 Jun 2021 16:37:53 +0800
Subject: [PATCH 6/6] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8Dtimer=5Fsettime?=
=?UTF-8?q?=E5=8F=AA=E8=AE=BE=E7=BD=AE=E7=AC=AC=E4=B8=80=E6=AC=A1=E5=88=B0?=
=?UTF-8?q?=E6=9C=9F=E6=97=B6=E9=97=B4=E6=97=B6=EF=BC=8C=E5=88=B0=E6=9C=9F?=
=?UTF-8?q?=E6=97=B6=E9=97=B4=E4=B8=8D=E5=87=86=E7=9A=84=E7=BC=BA=E9=99=B7?=
=?UTF-8?q?=20close:=20#I3TCHA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: Ie5c2ab74a8cbbd86dce913b53ae791f8f2da5133
Signed-off-by: arvinzzz
Change-Id: I571b0a3577026011aabcb0235985ea3e9be4441c
---
kal/posix/src/time.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kal/posix/src/time.c b/kal/posix/src/time.c
index 838be5a1..adf3ca76 100644
--- a/kal/posix/src/time.c
+++ b/kal/posix/src/time.c
@@ -188,7 +188,8 @@ int timer_settime(timer_t timerID, int flags,
intSave = LOS_IntLock();
swtmr = OS_SWT_FROM_SID(swtmrID);
swtmr->ucMode = (interval ? LOS_SWTMR_MODE_PERIOD : LOS_SWTMR_MODE_NO_SELFDELETE);
- swtmr->uwInterval = interval;
+ swtmr->uwInterval = (interval ? interval : expiry);
+
LOS_IntRestore(intSave);
if ((value->it_value.tv_sec == 0) && (value->it_value.tv_nsec == 0)) {