@@ -27,9 +27,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("kernel") {
|
||||
module_name = get_path_info(rebase_path("."), "name")
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"src/los_event.c",
|
||||
"src/los_init.c",
|
||||
@@ -44,36 +45,8 @@ static_library("kernel") {
|
||||
"src/mm/los_membox.c",
|
||||
"src/mm/los_memory.c",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"../components/cpup",
|
||||
"../components/exchook",
|
||||
"../components/backtrace",
|
||||
"../components/power",
|
||||
"../components/dynlink",
|
||||
]
|
||||
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
|
||||
if ("$board_cpu" == "cortex-m3") {
|
||||
deps = [ "arch/arm/cortex-m3/gcc/:arch" ]
|
||||
} else if ("$board_cpu" == "cortex-m4") {
|
||||
deps = [ "arch/arm/cortex-m4/gcc/:arch" ]
|
||||
} else if ("$board_cpu" == "cortex-m7") {
|
||||
deps = [ "arch/arm/cortex-m7/gcc/:arch" ]
|
||||
} else if ("$board_cpu" == "cortex-m33") {
|
||||
if (enable_ohos_kernel_liteos_m_tz) {
|
||||
deps = [ "arch/arm/cortex-m33/gcc/TZ:arch" ]
|
||||
} else {
|
||||
deps = [ "arch/arm/cortex-m33/gcc/NTZ:arch" ]
|
||||
}
|
||||
} else if ("$board_cpu" == "ck802" || "$board_cpu" == "e802") {
|
||||
deps = [ "arch/csky/v2/gcc:arch" ]
|
||||
} else if ("$board_cpu" == "") {
|
||||
if ("$board_arch" == "rv32imac" || "$board_arch" == "rv32imafdc") {
|
||||
deps = [ "arch/risc-v/riscv32/gcc:arch" ]
|
||||
} else if ("$board" == "esp32") {
|
||||
deps = [ "arch/xtensa/lx6/gcc:arch" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("public") {
|
||||
include_dirs = [ "include" ]
|
||||
}
|
||||
|
||||
81
kernel/arch/BUILD.gn
Normal file
81
kernel/arch/BUILD.gn
Normal file
@@ -0,0 +1,81 @@
|
||||
# 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.
|
||||
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
group("arch") {
|
||||
if ("$board_cpu" == "cortex-m3") {
|
||||
deps = [ "arm/cortex-m3/gcc/:arch" ]
|
||||
} else if ("$board_cpu" == "cortex-m4") {
|
||||
deps = [ "arm/cortex-m4/gcc/:arch" ]
|
||||
} else if ("$board_cpu" == "cortex-m7") {
|
||||
deps = [ "arm/cortex-m7/gcc/:arch" ]
|
||||
} else if ("$board_cpu" == "cortex-m33") {
|
||||
if (defined(LOSCFG_SECURE_TRUSTZONE)) {
|
||||
deps = [ "arm/cortex-m33/gcc/TZ:arch" ]
|
||||
} else {
|
||||
deps = [ "arm/cortex-m33/gcc/NTZ:arch" ]
|
||||
}
|
||||
} else if ("$board_cpu" == "ck802" || "$board_cpu" == "e802") {
|
||||
deps = [ "csky/v2/gcc:arch" ]
|
||||
} else if ("$board_cpu" == "") {
|
||||
if ("$board_arch" == "rv32imac" || "$board_arch" == "rv32imafdc") {
|
||||
deps = [ "risc-v/riscv32/gcc:arch" ]
|
||||
} else if ("$board" == "esp32") {
|
||||
deps = [ "xtensa/lx6/gcc:arch" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config("public") {
|
||||
include_dirs = [ "include" ]
|
||||
if (defined(LOSCFG_ARCH_ARM)) {
|
||||
include_dirs += [ "arm/include" ]
|
||||
if (defined(LOSCFG_ARCH_CORTEX_M3)) {
|
||||
include_dirs += [ "arm/cortex-m3/gcc" ]
|
||||
} else if (defined(LOSCFG_ARCH_CORTEX_M4)) {
|
||||
include_dirs += [ "arm/cortex-m4/gcc" ]
|
||||
} else if (defined(LOSCFG_ARCH_CORTEX_M7)) {
|
||||
include_dirs += [ "arm/cortex-m7/gcc" ]
|
||||
} else if (defined(LOSCFG_ARCH_CORTEX_M33)) {
|
||||
if (defined(LOSCFG_TRUSTZONE)) {
|
||||
include_dirs += [ "arm/cortex-m33/gcc/TZ/non_secure" ]
|
||||
} else {
|
||||
include_dirs += [ "arm/cortex-m33/gcc/NTZ" ]
|
||||
}
|
||||
}
|
||||
} else if (defined(LOSCFG_ARCH_RISCV32)) {
|
||||
include_dirs += [ "risc-v/riscv32/gcc" ]
|
||||
include_dirs += [ "risc-v/riscv32/gcc/asm" ]
|
||||
} else if (defined(LOSCFG_ARCH_CSKY)) {
|
||||
include_dirs += [ "csky/v2/gcc" ]
|
||||
} else if (defined(LOSCFG_ARCH_XTENSA)) {
|
||||
include_dirs += [ "xtensa/lx6/gcc" ]
|
||||
}
|
||||
}
|
||||
46
kernel/arch/Kconfig
Normal file
46
kernel/arch/Kconfig
Normal file
@@ -0,0 +1,46 @@
|
||||
config ARCH_ARM
|
||||
bool
|
||||
|
||||
rsource "arm/Kconfig"
|
||||
|
||||
config ARCH_CSKY
|
||||
bool
|
||||
|
||||
config ARCH_RISCV
|
||||
bool
|
||||
|
||||
config ARCH_RISCV32
|
||||
bool
|
||||
select ARCH_RISCV
|
||||
|
||||
config ARCH_XTENSA
|
||||
bool
|
||||
|
||||
comment "Extra Configurations"
|
||||
|
||||
config ARCH_FPU_DISABLE
|
||||
bool "Disable Floating Pointer Unit"
|
||||
default n
|
||||
help
|
||||
This option will bypass floating procedure in system.
|
||||
|
||||
config ARCH_SECURE_MONITOR_MODE
|
||||
bool "Run On Secure Monitor Mode"
|
||||
default n
|
||||
depends on ARCH_ARM_AARCH64
|
||||
help
|
||||
This option will make the system run on EL3.
|
||||
|
||||
config ARCH_INTERRUPT_PREEMPTION
|
||||
bool "Enable Interrupt Preemption"
|
||||
default n
|
||||
depends on ARCH_ARM_AARCH64
|
||||
help
|
||||
This option will support high priority interrupt preemption.
|
||||
|
||||
config IRQ_USE_STANDALONE_STACK
|
||||
bool "Use Interrupt Stack"
|
||||
default y
|
||||
depends on ARCH_ARM_AARCH64 || ARCH_ARM_AARCH32
|
||||
help
|
||||
This option will support using standalone interrupt stack.
|
||||
108
kernel/arch/arm/Kconfig
Normal file
108
kernel/arch/arm/Kconfig
Normal file
@@ -0,0 +1,108 @@
|
||||
# ARM Architecture
|
||||
|
||||
#
|
||||
# ARM has 32-bit(Aarch32) and 64-bit(Aarch64) implementations
|
||||
#
|
||||
config ARCH_ARM_AARCH32
|
||||
bool
|
||||
select ARCH_ARM
|
||||
help
|
||||
32-bit ARM architecture implementations, Except the M-profile.
|
||||
It is not limited to ARMv7-A but also ARMv7-R, ARMv8-A 32-bit and etc.
|
||||
|
||||
#
|
||||
# Architecture Versions
|
||||
#
|
||||
config ARCH_ARM_V7M
|
||||
bool
|
||||
|
||||
config ARCH_ARM_V5TE
|
||||
bool
|
||||
|
||||
config ARCH_ARM_VER
|
||||
string
|
||||
default "armv7-m" if ARCH_ARM_V7M
|
||||
default "armv5te" if ARCH_ARM_V5TE
|
||||
|
||||
#
|
||||
# VFP Hardware
|
||||
#
|
||||
config ARCH_FPU_VFP_V3
|
||||
bool
|
||||
help
|
||||
An optional extension to the Arm, Thumb, and ThumbEE instruction sets in the ARMv7-A and ARMv7-R profiles.
|
||||
VFPv3U is a variant of VFPv3 that supports the trapping of floating-point exceptions to support code.
|
||||
|
||||
config ARCH_FPU_VFP_V4
|
||||
bool
|
||||
help
|
||||
An optional extension to the Arm, Thumb, and ThumbEE instruction sets in the ARMv7-A and ARMv7-R profiles.
|
||||
VFPv4U is a variant of VFPv4 that supports the trapping of floating-point exceptions to support code.
|
||||
VFPv4 and VFPv4U add both the Half-precision Extension and the fused multiply-add instructions to the features of VFPv3.
|
||||
|
||||
config ARCH_FPU_VFP_D16
|
||||
bool
|
||||
depends on ARCH_ARM_AARCH32
|
||||
help
|
||||
VPU implemented with 16 doubleword registers (16 x 64-bit).
|
||||
|
||||
config ARCH_FPU_VFP_D32
|
||||
bool
|
||||
depends on ARCH_ARM_AARCH32
|
||||
help
|
||||
VPU implemented with 32 doubleword registers (32 x 64-bit).
|
||||
|
||||
config ARCH_FPU_VFP_NEON
|
||||
bool
|
||||
help
|
||||
Advanced SIMD extension (NEON) support.
|
||||
|
||||
config ARCH_FPU
|
||||
string
|
||||
default "vfpv3" if ARCH_FPU_VFP_V3 && ARCH_FPU_VFP_D32
|
||||
default "vfpv3-d16" if ARCH_FPU_VFP_V3 && ARCH_FPU_VFP_D16
|
||||
default "neon-vfpv4" if ARCH_FPU_VFP_V4 && ARCH_FPU_VFP_D32 && ARCH_FPU_VFP_NEON
|
||||
default "vfpv4" if ARCH_FPU_VFP_V4 && ARCH_FPU_VFP_D32
|
||||
default "vfpv4-d16" if ARCH_FPU_VFP_V4 && ARCH_FPU_VFP_D16
|
||||
|
||||
#
|
||||
# Supported Processor Cores
|
||||
#
|
||||
config ARCH_CORTEX_M3
|
||||
bool
|
||||
select ARCH_ARM_V7M
|
||||
select ARCH_ARM_AARCH32
|
||||
|
||||
config ARCH_CORTEX_M4
|
||||
bool
|
||||
select ARCH_ARM_V7M
|
||||
select ARCH_ARM_AARCH32
|
||||
|
||||
config ARCH_CORTEX_M7
|
||||
bool
|
||||
select ARCH_ARM_V7M
|
||||
select ARCH_ARM_AARCH32
|
||||
select ARCH_FPU_VFP_V4
|
||||
select ARCH_FPU_VFP_D32
|
||||
select ARCH_FPU_VFP_NEON
|
||||
|
||||
config ARCH_CORTEX_M33
|
||||
bool
|
||||
select ARCH_ARM_V7M
|
||||
select ARCH_ARM_AARCH32
|
||||
select ARCH_FPU_VFP_V4
|
||||
select ARCH_FPU_VFP_D32
|
||||
select ARCH_FPU_VFP_NEON
|
||||
|
||||
config ARCH_ARM9
|
||||
bool
|
||||
select ARCH_ARM_V5TE
|
||||
select ARCH_ARM_AARCH32
|
||||
|
||||
config ARCH_CPU
|
||||
string
|
||||
default "cortex-m3" if ARCH_CORTEX_M3
|
||||
default "cortex-m4" if ARCH_CORTEX_M4
|
||||
default "cortex-m7" if ARCH_CORTEX_M7
|
||||
default "cortex-m33" if ARCH_CORTEX_M33
|
||||
default "arm9" if ARCH_ARM9
|
||||
@@ -27,9 +27,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("arch") {
|
||||
module_name = "arch"
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"los_context.c",
|
||||
"los_dispatch.S",
|
||||
@@ -38,6 +39,4 @@ static_library("arch") {
|
||||
"los_timer.c",
|
||||
"reset_vector.S",
|
||||
]
|
||||
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
}
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("arch") {
|
||||
module_name = "arch"
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"los_context.c",
|
||||
"los_dispatch.S",
|
||||
@@ -37,6 +38,4 @@ static_library("arch") {
|
||||
"los_interrupt.c",
|
||||
"los_timer.c",
|
||||
]
|
||||
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
}
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("arch") {
|
||||
module_name = "arch"
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"los_context.c",
|
||||
"los_dispatch.S",
|
||||
@@ -37,6 +38,4 @@ static_library("arch") {
|
||||
"los_interrupt.c",
|
||||
"los_timer.c",
|
||||
]
|
||||
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
}
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("arch") {
|
||||
module_name = "arch"
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"non_secure/los_context.c",
|
||||
"non_secure/los_dispatch.S",
|
||||
@@ -40,9 +41,7 @@ static_library("arch") {
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"./non_secure",
|
||||
"./secure",
|
||||
"non_secure",
|
||||
"secure",
|
||||
]
|
||||
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
}
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("arch") {
|
||||
module_name = "arch"
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"los_context.c",
|
||||
"los_dispatch.S",
|
||||
@@ -38,6 +39,4 @@ static_library("arch") {
|
||||
"los_mpu.c",
|
||||
"los_timer.c",
|
||||
]
|
||||
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
}
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("arch") {
|
||||
module_name = "arch"
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"los_context.c",
|
||||
"los_dispatch.S",
|
||||
@@ -38,6 +39,4 @@ static_library("arch") {
|
||||
"los_mpu.c",
|
||||
"los_timer.c",
|
||||
]
|
||||
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
}
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("arch") {
|
||||
module_name = "arch"
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"los_context.c",
|
||||
"los_dispatch.S",
|
||||
@@ -37,6 +38,4 @@ static_library("arch") {
|
||||
"los_interrupt.c",
|
||||
"los_timer.c",
|
||||
]
|
||||
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
}
|
||||
|
||||
@@ -27,10 +27,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("arch") {
|
||||
asmflags = board_asmflags
|
||||
module_name = "arch"
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"los_context.c",
|
||||
"los_dispatch.S",
|
||||
@@ -40,6 +40,4 @@ static_library("arch") {
|
||||
]
|
||||
|
||||
include_dirs = [ "asm" ]
|
||||
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
}
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import("//kernel/liteos_m/config.gni")
|
||||
import("//kernel/liteos_m/liteos.gni")
|
||||
|
||||
static_library("arch") {
|
||||
module_name = "arch"
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"los_context.c",
|
||||
"los_dispatch.S",
|
||||
@@ -38,6 +39,4 @@ static_library("arch") {
|
||||
"los_timer.c",
|
||||
"los_window.S",
|
||||
]
|
||||
|
||||
configs += [ "$LITEOSTOPDIR:los_config" ]
|
||||
}
|
||||
|
||||
@@ -478,21 +478,6 @@ extern UINT8 *m_aucSysMem0;
|
||||
#define LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration memory leak detection
|
||||
* @attention
|
||||
* Need to enable backtrace module synchronously by configuration LOSCFG_BACKTRACE_TYPE,
|
||||
* and call OsBackTraceInit to complete initialization before the memory pool is initialized.
|
||||
*/
|
||||
#ifndef LOSCFG_MEM_LEAKCHECK
|
||||
#define LOSCFG_MEM_LEAKCHECK 0
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_MEM_LEAKCHECK == 1) && (LOSCFG_BACKTRACE_TYPE == 0)
|
||||
#error "if LOSCFG_MEM_LEAKCHECK is set to 1, then LOSCFG_BACKTRACE_TYPE must be set to 1, 2 or 3."
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* The default is 4, which means that the function call stack is recorded from the kernel interface,
|
||||
@@ -565,14 +550,6 @@ extern UINT8 *m_aucSysMem0;
|
||||
/* =============================================================================
|
||||
Exception module configuration
|
||||
============================================================================= */
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration item for exception tailoring
|
||||
*/
|
||||
#ifndef LOSCFG_PLATFORM_EXC
|
||||
#define LOSCFG_PLATFORM_EXC 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration of hardware stack protection
|
||||
@@ -582,27 +559,8 @@ extern UINT8 *m_aucSysMem0;
|
||||
#endif
|
||||
|
||||
/* =============================================================================
|
||||
CPUP module configuration
|
||||
KAL module configuration
|
||||
============================================================================= */
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration item for CPU usage tailoring
|
||||
*/
|
||||
#ifndef LOSCFG_BASE_CORE_CPUP
|
||||
#define LOSCFG_BASE_CORE_CPUP 0
|
||||
#endif
|
||||
|
||||
/* =============================================================================
|
||||
Test module configuration
|
||||
============================================================================= */
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration test case to open
|
||||
*/
|
||||
#ifndef LOSCFG_TEST
|
||||
#define LOSCFG_TEST 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration CMSIS_OS_VER
|
||||
@@ -611,21 +569,6 @@ extern UINT8 *m_aucSysMem0;
|
||||
#define CMSIS_OS_VER 2
|
||||
#endif
|
||||
|
||||
/* =============================================================================
|
||||
Fs module configuration
|
||||
============================================================================= */
|
||||
#ifndef LOSCFG_SUPPORT_FATFS
|
||||
#define LOSCFG_SUPPORT_FATFS 0
|
||||
#endif
|
||||
|
||||
#ifndef LOSCFG_SUPPORT_LITTLEFS
|
||||
#define LOSCFG_SUPPORT_LITTLEFS 1
|
||||
#endif
|
||||
|
||||
#ifndef LOSCFG_LFS_MAX_MOUNT_SIZE
|
||||
#define LOSCFG_LFS_MAX_MOUNT_SIZE 3
|
||||
#endif
|
||||
|
||||
/* =============================================================================
|
||||
Trace module configuration
|
||||
============================================================================= */
|
||||
@@ -633,46 +576,9 @@ extern UINT8 *m_aucSysMem0;
|
||||
* @ingroup los_config
|
||||
* Configuration trace tool
|
||||
*/
|
||||
#ifndef LOSCFG_DEBUG_HOOK
|
||||
#define LOSCFG_DEBUG_HOOK 0
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_DEBUG_HOOK == 1)
|
||||
#ifndef LOSCFG_KERNEL_TRACE
|
||||
#define LOSCFG_KERNEL_TRACE 0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_KERNEL_TRACE == 1)
|
||||
|
||||
#ifndef LOSCFG_TRACE_FRAME_MAX_PARAMS
|
||||
#define LOSCFG_TRACE_FRAME_MAX_PARAMS 3
|
||||
#endif
|
||||
|
||||
#ifndef LOSCFG_TRACE_FRAME_EVENT_COUNT
|
||||
#define LOSCFG_TRACE_FRAME_EVENT_COUNT 0
|
||||
#endif
|
||||
|
||||
#ifndef LOSCFG_RECORDER_MODE_OFFLINE
|
||||
#define LOSCFG_RECORDER_MODE_OFFLINE 1
|
||||
#endif
|
||||
|
||||
#ifndef LOSCFG_RECORDER_MODE_ONLINE
|
||||
#define LOSCFG_RECORDER_MODE_ONLINE 0
|
||||
#endif
|
||||
|
||||
#if (!(LOSCFG_RECORDER_MODE_OFFLINE ^ LOSCFG_RECORDER_MODE_ONLINE))
|
||||
#error One of LOSCFG_RECORDER_MODE_OFFLINE and LOSCFG_RECORDER_MODE_ONLINE should be set to 1 and only.
|
||||
#endif
|
||||
|
||||
#ifndef LOSCFG_TRACE_CLIENT_INTERACT
|
||||
#define LOSCFG_TRACE_CLIENT_INTERACT 1
|
||||
#endif
|
||||
|
||||
#ifndef LOSCFG_TRACE_BUFFER_SIZE
|
||||
#define LOSCFG_TRACE_BUFFER_SIZE 2048
|
||||
#endif
|
||||
|
||||
#ifndef NUM_HAL_INTERRUPT_UART
|
||||
#define NUM_HAL_INTERRUPT_UART 0xff
|
||||
#endif
|
||||
@@ -683,41 +589,6 @@ extern UINT8 *m_aucSysMem0;
|
||||
|
||||
#endif
|
||||
|
||||
/* =============================================================================
|
||||
PM module configuration
|
||||
============================================================================= */
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration item for low power frame tailoring
|
||||
*/
|
||||
#ifndef LOSCFG_KERNEL_PM
|
||||
#define LOSCFG_KERNEL_PM 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration item for priority of low-power task.
|
||||
*/
|
||||
#ifndef LOSCFG_KERNEL_PM_TASK_PTIORITY
|
||||
#define LOSCFG_KERNEL_PM_TASK_PTIORITY 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration item for stack size of low-power task.
|
||||
*/
|
||||
#ifndef LOSCFG_KERNEL_PM_TASK_STACKSIZE
|
||||
#define LOSCFG_KERNEL_PM_TASK_STACKSIZE 0x800
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration item for low power frame debug tailoring
|
||||
*/
|
||||
#ifndef LOSCFG_KERNEL_PM_DEBUG
|
||||
#define LOSCFG_KERNEL_PM_DEBUG 0
|
||||
#endif
|
||||
|
||||
/* =============================================================================
|
||||
printf configuration
|
||||
============================================================================= */
|
||||
@@ -730,52 +601,8 @@ extern UINT8 *m_aucSysMem0;
|
||||
#endif
|
||||
|
||||
/* =============================================================================
|
||||
backtrace configuration
|
||||
misc configuration
|
||||
============================================================================= */
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration backtrace type
|
||||
* 0: Close stack analysis module.
|
||||
* 1: Call stack analysis for cortex-m series by scanning the stack.
|
||||
* 2: Call stack analysis for risc-v by using frame pointer.
|
||||
* 3: Call stack analysis for risc-v by scanning the stack.
|
||||
* 4: Call stack analysis for xtensa by scanning the stack.
|
||||
* 5: Call stack analysis for c-sky by scanning the stack.
|
||||
* 6: Call stack analysis for arm9 by scanning the stack.
|
||||
* others: Not currently supported.
|
||||
*/
|
||||
#ifndef LOSCFG_BACKTRACE_TYPE
|
||||
#define LOSCFG_BACKTRACE_TYPE 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration backtrace depth.
|
||||
*/
|
||||
#ifndef LOSCFG_BACKTRACE_DEPTH
|
||||
#define LOSCFG_BACKTRACE_DEPTH 15
|
||||
#endif
|
||||
|
||||
/* =============================================================================
|
||||
trustzone configuration
|
||||
============================================================================= */
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration trustzone secure heap size.
|
||||
*/
|
||||
#ifndef LOSCFG_SECURE_HEAP_SIZE
|
||||
#define LOSCFG_SECURE_HEAP_SIZE 2048
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration trustzone secure stack default size.
|
||||
* The secure stack must be allocated before the task calls non-secure callble functions.
|
||||
*/
|
||||
#ifndef LOSCFG_SECURE_STACK_DEFAULT_SIZE
|
||||
#define LOSCFG_SECURE_STACK_DEFAULT_SIZE 512
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration item for mpu.
|
||||
@@ -788,25 +615,6 @@ extern UINT8 *m_aucSysMem0;
|
||||
#error "if hardware stack protection is enabled, then MPU should be supported and enabled"
|
||||
#endif
|
||||
|
||||
/*=============================================================================
|
||||
shell module configuration
|
||||
=============================================================================*/
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration item for shell.
|
||||
*/
|
||||
#ifndef LOSCFG_USE_SHELL
|
||||
#define LOSCFG_USE_SHELL 0
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration shell task priority.
|
||||
*/
|
||||
#ifndef LOSCFG_SHELL_PRIO
|
||||
#define LOSCFG_SHELL_PRIO 3
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Configuration item to get task used memory.
|
||||
|
||||
@@ -202,14 +202,6 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_KernelInit(VOID)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_TEST == 1)
|
||||
ret = los_TestInit();
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("los_TestInit error\n");
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_PLATFORM_EXC == 1)
|
||||
OsExcMsgDumpInit();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user