Compare commits
36 Commits
weekly_202
...
weekly_202
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
df9387c28f | ||
|
|
d08a3e3f13 | ||
|
|
48ff5189b8 | ||
|
|
600283a96f | ||
|
|
a333e8f88e | ||
|
|
ce49331798 | ||
|
|
fc8c547b05 | ||
|
|
8cfadb9b4d | ||
|
|
2c5b750a46 | ||
|
|
3df936f1a1 | ||
|
|
6fa1fe5993 | ||
|
|
8a05eb6e08 | ||
|
|
243fe55c68 | ||
|
|
a7341d81d1 | ||
|
|
c8ce65f408 | ||
|
|
c1e3856bbe | ||
|
|
3a887c616a | ||
|
|
3303cd7bc1 | ||
|
|
7c5a05f352 | ||
|
|
5df101eae5 | ||
|
|
128c3dffb5 | ||
|
|
e8f3f9674c | ||
|
|
5cfec18d24 | ||
|
|
def41f8edd | ||
|
|
3387c32b8a | ||
|
|
6881d3da46 | ||
|
|
e21e8753d1 | ||
|
|
397f24dd6f | ||
|
|
831d089652 | ||
|
|
f5fa92feff | ||
|
|
bed1d28df8 | ||
|
|
efebc00f87 | ||
|
|
28c1529e2f | ||
|
|
159d304275 | ||
|
|
18f65ae0b3 | ||
|
|
c6958aa181 |
9
BUILD.gn
9
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) 2020-2022 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:
|
||||
@@ -82,11 +82,10 @@ config("stdinc_config") {
|
||||
"-isystem",
|
||||
std_include,
|
||||
]
|
||||
cflags += [ "-nostdinc" ]
|
||||
asmflags = cflags
|
||||
if (defined(LOSCFG_LIBC_NEWLIB)) {
|
||||
cflags -= [ "-nostdinc" ]
|
||||
if (defined(LOSCFG_LIBC_MUSL)) {
|
||||
cflags += [ "-nostdinc" ]
|
||||
}
|
||||
asmflags = cflags
|
||||
}
|
||||
|
||||
config("ssp_config") {
|
||||
|
||||
7
Kconfig
7
Kconfig
@@ -581,7 +581,7 @@ config MEM_LEAKCHECK
|
||||
depends on DEBUG_VERSION && MEM_DEBUG
|
||||
select KERNEL_BACKTRACE
|
||||
help
|
||||
Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the informations of mem node.
|
||||
Answer Y to enable record the LR of Function call stack of Mem operation, it can check the mem leak through the information of mem node.
|
||||
config BASE_MEM_NODE_INTEGRITY_CHECK
|
||||
bool "Enable integrity check or not"
|
||||
default n
|
||||
@@ -597,6 +597,11 @@ config VM_OVERLAP_CHECK
|
||||
depends on DEBUG_VERSION && MEM_DEBUG
|
||||
help
|
||||
Answer Y to enable vm overlap check.
|
||||
|
||||
config TASK_MEM_USED
|
||||
bool "Enable show task mem used or not"
|
||||
default n
|
||||
depends on DEBUG_VERSION && MEM_DEBUG
|
||||
|
||||
endmenu
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ OpenHarmony LiteOS-M内核是面向IoT领域构建的轻量级物联网操作系
|
||||
│ │ ├── cortex-m3 # cortex-m3架构代码
|
||||
│ │ ├── cortex-m33 # cortex-m33架构代码
|
||||
│ │ ├── cortex-m4 # cortex-m4架构代码
|
||||
│ │ ├── cortex-m55 # cortex-m55架构代码
|
||||
│ │ ├── cortex-m7 # cortex-m7架构代码
|
||||
│ │ └── include # arm架构公共头文件目录
|
||||
│ ├── csky # csky架构代码
|
||||
|
||||
@@ -622,19 +622,19 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
|
||||
#if (LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT == 1)
|
||||
UINT32 index;
|
||||
g_hwiForm[0] = 0; /* [0] Top of Stack */
|
||||
g_hwiForm[1] = Reset_Handler; /* [1] reset */
|
||||
g_hwiForm[1] = (HWI_PROC_FUNC)Reset_Handler; /* [1] reset */
|
||||
for (index = 2; index < OS_VECTOR_CNT; index++) { /* 2: The starting position of the interrupt */
|
||||
g_hwiForm[index] = (HWI_PROC_FUNC)HalHwiDefaultHandler;
|
||||
}
|
||||
/* Exception handler register */
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalExcSvcCall;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = SysTick_Handler;
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcSvcCall;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)SysTick_Handler;
|
||||
|
||||
/* Interrupt vector table location */
|
||||
SCB->VTOR = (UINT32)(UINTPTR)g_hwiForm;
|
||||
|
||||
@@ -618,14 +618,14 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
|
||||
g_hwiForm[index] = (HWI_PROC_FUNC)HalHwiDefaultHandler;
|
||||
}
|
||||
/* Exception handler register */
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalSVCHandler;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = OsTickHandler;
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalSVCHandler;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)OsTickHandler;
|
||||
|
||||
/* Interrupt vector table location */
|
||||
SCB->VTOR = (UINT32)(UINTPTR)g_hwiForm;
|
||||
|
||||
@@ -618,14 +618,14 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
|
||||
g_hwiForm[index] = (HWI_PROC_FUNC)HalHwiDefaultHandler;
|
||||
}
|
||||
/* Exception handler register */
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalSVCHandler;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = OsTickHandler;
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalSVCHandler;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)OsTickHandler;
|
||||
|
||||
/* Interrupt vector table location */
|
||||
SCB->VTOR = (UINT32)(UINTPTR)g_hwiForm;
|
||||
|
||||
@@ -623,19 +623,19 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
|
||||
#if (LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT == 1)
|
||||
UINT32 index;
|
||||
g_hwiForm[0] = 0; /* [0] Top of Stack */
|
||||
g_hwiForm[1] = Reset_Handler; /* [1] reset */
|
||||
g_hwiForm[1] = (HWI_PROC_FUNC)Reset_Handler; /* [1] reset */
|
||||
for (index = 2; index < OS_VECTOR_CNT; index++) { /* 2: The starting position of the interrupt */
|
||||
g_hwiForm[index] = (HWI_PROC_FUNC)HalHwiDefaultHandler;
|
||||
}
|
||||
/* Exception handler register */
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalSVCHandler;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = SysTick_Handler;
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalSVCHandler;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)SysTick_Handler;
|
||||
|
||||
/* Interrupt vector table location */
|
||||
SCB->VTOR = (UINT32)(UINTPTR)g_hwiForm;
|
||||
|
||||
@@ -623,19 +623,19 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
|
||||
#if (LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT == 1)
|
||||
UINT32 index;
|
||||
g_hwiForm[0] = 0; /* [0] Top of Stack */
|
||||
g_hwiForm[1] = Reset_Handler; /* [1] reset */
|
||||
g_hwiForm[1] = (HWI_PROC_FUNC)Reset_Handler; /* [1] reset */
|
||||
for (index = 2; index < OS_VECTOR_CNT; index++) { /* 2: The starting position of the interrupt */
|
||||
g_hwiForm[index] = (HWI_PROC_FUNC)HalHwiDefaultHandler;
|
||||
}
|
||||
/* Exception handler register */
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalSVCHandler;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = SysTick_Handler;
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalSVCHandler;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)SysTick_Handler;
|
||||
|
||||
/* Interrupt vector table location */
|
||||
SCB->VTOR = (UINT32)(UINTPTR)g_hwiForm;
|
||||
|
||||
@@ -626,19 +626,19 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
|
||||
#if (LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT == 1)
|
||||
UINT32 index;
|
||||
g_hwiForm[0] = 0; /* [0] Top of Stack */
|
||||
g_hwiForm[1] = Reset_Handler; /* [1] reset */
|
||||
g_hwiForm[1] = (HWI_PROC_FUNC)Reset_Handler; /* [1] reset */
|
||||
for (index = 2; index < OS_VECTOR_CNT; index++) { /* 2: The starting position of the interrupt */
|
||||
g_hwiForm[index] = (HWI_PROC_FUNC)HalHwiDefaultHandler;
|
||||
}
|
||||
/* Exception handler register */
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalExcSvcCall;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = SysTick_Handler;
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcSvcCall;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)SysTick_Handler;
|
||||
|
||||
/* Interrupt vector table location */
|
||||
SCB->VTOR = (UINT32)(UINTPTR)g_hwiForm;
|
||||
|
||||
@@ -624,19 +624,19 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
|
||||
#if (LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT == 1)
|
||||
UINT32 index;
|
||||
g_hwiForm[0] = 0; /* [0] Top of Stack */
|
||||
g_hwiForm[1] = Reset_Handler; /* [1] reset */
|
||||
g_hwiForm[1] = (HWI_PROC_FUNC)Reset_Handler; /* [1] reset */
|
||||
for (index = 2; index < OS_VECTOR_CNT; index++) { /* 2: The starting position of the interrupt */
|
||||
g_hwiForm[index] = (HWI_PROC_FUNC)HalHwiDefaultHandler;
|
||||
}
|
||||
/* Exception handler register */
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalExcSvcCall;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = SysTick_Handler;
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcSvcCall;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)SysTick_Handler;
|
||||
|
||||
/* Interrupt vector table location */
|
||||
SCB->VTOR = (UINT32)(UINTPTR)g_hwiForm;
|
||||
|
||||
@@ -626,14 +626,14 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
|
||||
g_hwiForm[index] = (HWI_PROC_FUNC)HalHwiDefaultHandler;
|
||||
}
|
||||
/* Exception handler register */
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalSVCHandler;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = OsTickHandler;
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalSVCHandler;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)OsTickHandler;
|
||||
|
||||
/* Interrupt vector table location */
|
||||
SCB->VTOR = (UINT32)(UINTPTR)g_hwiForm;
|
||||
|
||||
@@ -611,19 +611,19 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
|
||||
#if (LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT == 1)
|
||||
UINT32 index;
|
||||
g_hwiForm[0] = 0; /* [0] Top of Stack */
|
||||
g_hwiForm[1] = Reset_Handler; /* [1] reset */
|
||||
g_hwiForm[1] = (HWI_PROC_FUNC)Reset_Handler; /* [1] reset */
|
||||
for (index = 2; index < OS_VECTOR_CNT; index++) { /* 2: The starting position of the interrupt */
|
||||
g_hwiForm[index] = (HWI_PROC_FUNC)HalHwiDefaultHandler;
|
||||
}
|
||||
/* Exception handler register */
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalExcSvcCall;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = SysTick_Handler;
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcSvcCall;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)SysTick_Handler;
|
||||
|
||||
/* Interrupt vector table location */
|
||||
SCB->VTOR = (UINT32)(UINTPTR)g_hwiForm;
|
||||
|
||||
@@ -620,19 +620,19 @@ LITE_OS_SEC_TEXT_INIT VOID HalHwiInit(VOID)
|
||||
#if (LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT == 1)
|
||||
UINT32 index;
|
||||
g_hwiForm[0] = 0; /* [0] Top of Stack */
|
||||
g_hwiForm[1] = Reset_Handler; /* [1] reset */
|
||||
g_hwiForm[1] = (HWI_PROC_FUNC)Reset_Handler; /* [1] reset */
|
||||
for (index = 2; index < OS_VECTOR_CNT; index++) { /* 2: The starting position of the interrupt */
|
||||
g_hwiForm[index] = (HWI_PROC_FUNC)HalHwiDefaultHandler;
|
||||
}
|
||||
/* Exception handler register */
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = HalExcSvcCall;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = SysTick_Handler;
|
||||
g_hwiForm[NonMaskableInt_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcNMI;
|
||||
g_hwiForm[HARDFAULT_IRQN + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcHardFault;
|
||||
g_hwiForm[MemoryManagement_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcMemFault;
|
||||
g_hwiForm[BusFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcBusFault;
|
||||
g_hwiForm[UsageFault_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcUsageFault;
|
||||
g_hwiForm[SVCall_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalExcSvcCall;
|
||||
g_hwiForm[PendSV_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)HalPendSV;
|
||||
g_hwiForm[SysTick_IRQn + OS_SYS_VECTOR_CNT] = (HWI_PROC_FUNC)SysTick_Handler;
|
||||
|
||||
/* Interrupt vector table location */
|
||||
SCB->VTOR = (UINT32)(UINTPTR)g_hwiForm;
|
||||
|
||||
@@ -51,7 +51,7 @@ extern "C" {
|
||||
|
||||
/**
|
||||
* @ingroup los_hwi
|
||||
* Count of Nuclei interrupt vector maxium, which is configurable.
|
||||
* Count of Nuclei interrupt vector maximum, which is configurable.
|
||||
*/
|
||||
#define OS_RISCV_CUSTOM_IRQ_VECTOR_CNT SOC_INT_MAX
|
||||
|
||||
|
||||
@@ -193,15 +193,15 @@ VOID HalDisplayTaskInfo(VOID)
|
||||
|
||||
/* ****************************************************************************
|
||||
Function : HalUnalignedAccessFix
|
||||
Description : Unaligned acess fixes are not supported by default
|
||||
Description : Unaligned access fixes are not supported by default
|
||||
Input : None
|
||||
Output : None
|
||||
Return : None
|
||||
**************************************************************************** */
|
||||
WEAK UINT32 HalUnalignedAccessFix(UINTPTR mcause, UINTPTR mepc, UINTPTR mtval, VOID *sp)
|
||||
{
|
||||
/* Unaligned acess fixes are not supported by default */
|
||||
PRINTK("Unaligned acess fixes are not support by default!\r\n");
|
||||
/* Unaligned access fixes are not supported by default */
|
||||
PRINTK("Unaligned access fixes are not support by default!\r\n");
|
||||
return LOS_NOK;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,9 +62,9 @@
|
||||
* - ZEm(data): Zero-Extend data to m-bit.
|
||||
* - ABS(x): Calculate the absolute value of `x`.
|
||||
* - CONCAT(x,y): Concatinate `x` and `y` to form a value.
|
||||
* - u<: Unsinged less than comparison.
|
||||
* - u<=: Unsinged less than & equal comparison.
|
||||
* - u>: Unsinged greater than comparison.
|
||||
* - u<: Unsigned less than comparison.
|
||||
* - u<=: Unsigned less than & equal comparison.
|
||||
* - u>: Unsigned greater than comparison.
|
||||
* - s*: Signed multiplication.
|
||||
* - u*: Unsigned multiplication.
|
||||
*
|
||||
@@ -2641,7 +2641,7 @@ __STATIC_FORCEINLINE long __RV_KHMTT(unsigned int a, unsigned int b)
|
||||
/* ===== Inline Function Start for 3.38.1. KMABB ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMABB (SIMD Saturating Signed Multiply Bottom Halfs & Add)
|
||||
* \brief KMABB (SIMD Saturating Signed Multiply Bottom Halves & Add)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -2704,7 +2704,7 @@ __STATIC_FORCEINLINE long __RV_KMABB(long t, unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.38.2. KMABT ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMABT (SIMD Saturating Signed Multiply Bottom & Top Halfs & Add)
|
||||
* \brief KMABT (SIMD Saturating Signed Multiply Bottom & Top Halves & Add)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -2767,7 +2767,7 @@ __STATIC_FORCEINLINE long __RV_KMABT(long t, unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.38.3. KMATT ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMATT (SIMD Saturating Signed Multiply Top Halfs & Add)
|
||||
* \brief KMATT (SIMD Saturating Signed Multiply Top Halves & Add)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -2830,7 +2830,7 @@ __STATIC_FORCEINLINE long __RV_KMATT(long t, unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.39.1. KMADA ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMADA (SIMD Saturating Signed Multiply Two Halfs and Two Adds)
|
||||
* \brief KMADA (SIMD Saturating Signed Multiply Two Halves and Two Adds)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -2894,7 +2894,7 @@ __STATIC_FORCEINLINE long __RV_KMADA(long t, unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.39.2. KMAXDA ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMAXDA (SIMD Saturating Signed Crossed Multiply Two Halfs and Two Adds)
|
||||
* \brief KMAXDA (SIMD Saturating Signed Crossed Multiply Two Halves and Two Adds)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -2958,7 +2958,7 @@ __STATIC_FORCEINLINE long __RV_KMAXDA(long t, unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.40.1. KMADS ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMADS (SIMD Saturating Signed Multiply Two Halfs & Subtract & Add)
|
||||
* \brief KMADS (SIMD Saturating Signed Multiply Two Halves & Subtract & Add)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -3030,7 +3030,7 @@ __STATIC_FORCEINLINE long __RV_KMADS(long t, unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.40.2. KMADRS ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMADRS (SIMD Saturating Signed Multiply Two Halfs & Reverse Subtract & Add)
|
||||
* \brief KMADRS (SIMD Saturating Signed Multiply Two Halves & Reverse Subtract & Add)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -3102,7 +3102,7 @@ __STATIC_FORCEINLINE long __RV_KMADRS(long t, unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.40.3. KMAXDS ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMAXDS (SIMD Saturating Signed Crossed Multiply Two Halfs & Subtract & Add)
|
||||
* \brief KMAXDS (SIMD Saturating Signed Crossed Multiply Two Halves & Subtract & Add)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -3242,7 +3242,7 @@ __STATIC_FORCEINLINE long long __RV_KMAR64(long long t, long a, long b)
|
||||
/* ===== Inline Function Start for 3.42.1. KMDA ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMDA (SIMD Signed Multiply Two Halfs and Add)
|
||||
* \brief KMDA (SIMD Signed Multiply Two Halves and Add)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -3293,7 +3293,7 @@ __STATIC_FORCEINLINE long __RV_KMDA(unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.42.2. KMXDA ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMXDA (SIMD Signed Crossed Multiply Two Halfs and Add)
|
||||
* \brief KMXDA (SIMD Signed Crossed Multiply Two Halves and Add)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -4330,7 +4330,7 @@ __STATIC_FORCEINLINE long __RV_KMMWT2_U(long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.51.1. KMSDA ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMSDA (SIMD Saturating Signed Multiply Two Halfs & Add & Subtract)
|
||||
* \brief KMSDA (SIMD Saturating Signed Multiply Two Halves & Add & Subtract)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -4392,7 +4392,7 @@ __STATIC_FORCEINLINE long __RV_KMSDA(long t, unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.51.2. KMSXDA ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief KMSXDA (SIMD Saturating Signed Crossed Multiply Two Halfs & Add & Subtract)
|
||||
* \brief KMSXDA (SIMD Saturating Signed Crossed Multiply Two Halves & Add & Subtract)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -5558,7 +5558,7 @@ __STATIC_FORCEINLINE long __RV_KSUBH(int a, int b)
|
||||
* **Description**:\n
|
||||
* The signed lower 32-bit content of Rs2 is subtracted from the signed lower 32-bit
|
||||
* content of Rs1. And the result is saturated to the 32-bit signed integer range of [-2^31, 2^31-1] and then
|
||||
* sign-extened and written to Rd. If saturation happens, this instruction sets the OV flag.
|
||||
* sign-extended and written to Rd. If saturation happens, this instruction sets the OV flag.
|
||||
*
|
||||
* **Operations**:\n
|
||||
* ~~~
|
||||
@@ -7337,7 +7337,7 @@ __STATIC_FORCEINLINE unsigned long __RV_SLL16(unsigned long a, unsigned int b)
|
||||
/* ===== Inline Function Start for 3.104. SMAL ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_64B_ADDSUB
|
||||
* \brief SMAL (Signed Multiply Halfs & Add 64-bit)
|
||||
* \brief SMAL (Signed Multiply Halves & Add 64-bit)
|
||||
* \details
|
||||
* **Type**: Partial-SIMD
|
||||
*
|
||||
@@ -7397,7 +7397,7 @@ __STATIC_FORCEINLINE long long __RV_SMAL(long long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.105.1. SMALBB ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_64B_ADDSUB
|
||||
* \brief SMALBB (Signed Multiply Bottom Halfs & Add 64-bit)
|
||||
* \brief SMALBB (Signed Multiply Bottom Halves & Add 64-bit)
|
||||
* \details
|
||||
* **Type**: DSP (64-bit Profile)
|
||||
*
|
||||
@@ -7561,7 +7561,7 @@ __STATIC_FORCEINLINE long long __RV_SMALBT(long long t, unsigned long a, unsigne
|
||||
/* ===== Inline Function Start for 3.105.3. SMALTT ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_64B_ADDSUB
|
||||
* \brief SMALTT (Signed Multiply Top Halfs & Add 64-bit)
|
||||
* \brief SMALTT (Signed Multiply Top Halves & Add 64-bit)
|
||||
* \details
|
||||
* **Type**: DSP (64-bit Profile)
|
||||
*
|
||||
@@ -7643,7 +7643,7 @@ __STATIC_FORCEINLINE long long __RV_SMALTT(long long t, unsigned long a, unsigne
|
||||
/* ===== Inline Function Start for 3.106.1. SMALDA ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_64B_ADDSUB
|
||||
* \brief SMALDA (Signed Multiply Two Halfs and Two Adds 64-bit)
|
||||
* \brief SMALDA (Signed Multiply Two Halves and Two Adds 64-bit)
|
||||
* \details
|
||||
* **Type**: DSP (64-bit Profile)
|
||||
*
|
||||
@@ -7727,7 +7727,7 @@ __STATIC_FORCEINLINE long long __RV_SMALDA(long long t, unsigned long a, unsigne
|
||||
/* ===== Inline Function Start for 3.106.2. SMALXDA ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_64B_ADDSUB
|
||||
* \brief SMALXDA (Signed Crossed Multiply Two Halfs and Two Adds 64-bit)
|
||||
* \brief SMALXDA (Signed Crossed Multiply Two Halves and Two Adds 64-bit)
|
||||
* \details
|
||||
* **Type**: DSP (64-bit Profile)
|
||||
*
|
||||
@@ -7811,7 +7811,7 @@ __STATIC_FORCEINLINE long long __RV_SMALXDA(long long t, unsigned long a, unsign
|
||||
/* ===== Inline Function Start for 3.107.1. SMALDS ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_64B_ADDSUB
|
||||
* \brief SMALDS (Signed Multiply Two Halfs & Subtract & Add 64-bit)
|
||||
* \brief SMALDS (Signed Multiply Two Halves & Subtract & Add 64-bit)
|
||||
* \details
|
||||
* **Type**: DSP (64-bit Profile)
|
||||
*
|
||||
@@ -7902,7 +7902,7 @@ __STATIC_FORCEINLINE long long __RV_SMALDS(long long t, unsigned long a, unsigne
|
||||
/* ===== Inline Function Start for 3.107.2. SMALDRS ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_64B_ADDSUB
|
||||
* \brief SMALDRS (Signed Multiply Two Halfs & Reverse Subtract & Add 64- bit)
|
||||
* \brief SMALDRS (Signed Multiply Two Halves & Reverse Subtract & Add 64- bit)
|
||||
* \details
|
||||
* **Type**: DSP (64-bit Profile)
|
||||
*
|
||||
@@ -7993,7 +7993,7 @@ __STATIC_FORCEINLINE long long __RV_SMALDRS(long long t, unsigned long a, unsign
|
||||
/* ===== Inline Function Start for 3.107.3. SMALXDS ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_64B_ADDSUB
|
||||
* \brief SMALXDS (Signed Crossed Multiply Two Halfs & Subtract & Add 64- bit)
|
||||
* \brief SMALXDS (Signed Crossed Multiply Two Halves & Subtract & Add 64- bit)
|
||||
* \details
|
||||
* **Type**: DSP (64-bit Profile)
|
||||
*
|
||||
@@ -8459,7 +8459,7 @@ __STATIC_FORCEINLINE long __RV_SMTT16(unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.114.1. SMDS ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief SMDS (SIMD Signed Multiply Two Halfs and Subtract)
|
||||
* \brief SMDS (SIMD Signed Multiply Two Halves and Subtract)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -8518,7 +8518,7 @@ __STATIC_FORCEINLINE long __RV_SMDS(unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.114.2. SMDRS ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief SMDRS (SIMD Signed Multiply Two Halfs and Reverse Subtract)
|
||||
* \brief SMDRS (SIMD Signed Multiply Two Halves and Reverse Subtract)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -8577,7 +8577,7 @@ __STATIC_FORCEINLINE long __RV_SMDRS(unsigned long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.114.3. SMXDS ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_32B_ADDSUB
|
||||
* \brief SMXDS (SIMD Signed Crossed Multiply Two Halfs and Subtract)
|
||||
* \brief SMXDS (SIMD Signed Crossed Multiply Two Halves and Subtract)
|
||||
* \details
|
||||
* **Type**: SIMD
|
||||
*
|
||||
@@ -9016,7 +9016,7 @@ __STATIC_FORCEINLINE long __RV_SMMWT_U(long a, unsigned long b)
|
||||
/* ===== Inline Function Start for 3.120.1. SMSLDA ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_64B_ADDSUB
|
||||
* \brief SMSLDA (Signed Multiply Two Halfs & Add & Subtract 64-bit)
|
||||
* \brief SMSLDA (Signed Multiply Two Halves & Add & Subtract 64-bit)
|
||||
* \details
|
||||
* **Type**: DSP (64-bit Profile)
|
||||
*
|
||||
@@ -9098,7 +9098,7 @@ __STATIC_FORCEINLINE long long __RV_SMSLDA(long long t, unsigned long a, unsigne
|
||||
/* ===== Inline Function Start for 3.120.2. SMSLXDA ===== */
|
||||
/**
|
||||
* \ingroup NMSIS_Core_DSP_Intrinsic_SIGNED_16B_MULT_64B_ADDSUB
|
||||
* \brief SMSLXDA (Signed Crossed Multiply Two Halfs & Add & Subtract 64- bit)
|
||||
* \brief SMSLXDA (Signed Crossed Multiply Two Halves & Add & Subtract 64- bit)
|
||||
* \details
|
||||
* **Type**: DSP (64-bit Profile)
|
||||
*
|
||||
|
||||
@@ -282,7 +282,7 @@ __STATIC_FORCEINLINE uint32_t __ECLIC_GetCfgNlbits(void)
|
||||
* This function gets the hardware version information from CLICINFO register.
|
||||
* \return hardware version number in CLICINFO register.
|
||||
* \remarks
|
||||
* - This function gets harware version information from CLICINFO register.
|
||||
* - This function gets hardware version information from CLICINFO register.
|
||||
* - Bit 20:17 for architecture version, bit 16:13 for implementation version.
|
||||
* \sa
|
||||
* - \ref ECLIC_GetInfoNum
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
* \details
|
||||
* * We can save power by disable FPU Unit.
|
||||
* * When FPU Unit is disabled, any access to FPU related CSR registers
|
||||
* and FPU instructions will cause illegal Instuction Exception.
|
||||
* and FPU instructions will cause illegal Instruction Exception.
|
||||
* */
|
||||
#define __disable_FPU() __RV_CSR_CLEAR(CSR_MSTATUS, MSTATUS_FS)
|
||||
|
||||
|
||||
@@ -282,7 +282,7 @@ __STATIC_FORCEINLINE void SysTimer_SoftwareReset(void)
|
||||
* \details Initializes the System Timer and its non-vector interrupt, and starts the System Tick Timer.
|
||||
*
|
||||
* In our default implementation, the timer counter will be set to zero, and it will start a timer compare non-vector interrupt
|
||||
* when it matchs the ticks user set, during the timer interrupt user should reload the system tick using \ref SysTick_Reload function
|
||||
* when it matches the ticks user set, during the timer interrupt user should reload the system tick using \ref SysTick_Reload function
|
||||
* or similar function written by user, so it can produce period timer interrupt.
|
||||
* \param [in] ticks Number of ticks between two interrupts.
|
||||
* \return 0 Function succeeded.
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
* \brief NMSIS Core CSR Register Definitions
|
||||
* \details
|
||||
*
|
||||
* The following macros are used for CSR Register Defintions.
|
||||
* The following macros are used for CSR Register Definitions.
|
||||
* @{
|
||||
*/
|
||||
/* === Standard RISC-V CSR Registers === */
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
* - Neural Network Support Functions
|
||||
*
|
||||
* The library has separate functions for operating on different weight and activation data
|
||||
* types including 8-bit integers (q7_t) and 16-bit integers (q15_t). The descrition of the
|
||||
* types including 8-bit integers (q7_t) and 16-bit integers (q15_t). The description of the
|
||||
* kernels are included in the function description. The implementation details are also
|
||||
* described in this paper [1].
|
||||
*
|
||||
@@ -119,7 +119,7 @@ extern "C"
|
||||
/**
|
||||
* @brief Basic Q7 convolution function
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in input tensor dimention
|
||||
* @param[in] dim_im_in input tensor dimension
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -156,8 +156,8 @@ extern "C"
|
||||
/**
|
||||
* @brief Basic Q7 convolution function (non-sqaure shape)
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in_x input tensor dimention x
|
||||
* @param[in] dim_im_in_y input tensor dimention y
|
||||
* @param[in] dim_im_in_x input tensor dimension x
|
||||
* @param[in] dim_im_in_y input tensor dimension y
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -202,7 +202,7 @@ extern "C"
|
||||
/**
|
||||
* @brief Basic Q15 convolution function
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in input tensor dimention
|
||||
* @param[in] dim_im_in input tensor dimension
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -239,7 +239,7 @@ extern "C"
|
||||
/**
|
||||
* @brief Fast Q7 convolution function
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in input tensor dimention
|
||||
* @param[in] dim_im_in input tensor dimension
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -257,7 +257,7 @@ extern "C"
|
||||
* <code>RISCV_MATH_SIZE_MISMATCH</code> or <code>RISCV_MATH_SUCCESS</code> based on the outcome of size checking.
|
||||
*
|
||||
* This function is the version with full list of optimization tricks, but with
|
||||
* some contraints:
|
||||
* some constraints:
|
||||
* ch_im_in is multiple of 4
|
||||
* ch_im_out is multiple of 2
|
||||
*/
|
||||
@@ -281,8 +281,8 @@ extern "C"
|
||||
/**
|
||||
* @brief Fast Q7 convolution function (non-sqaure shape)
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in_x input tensor dimention x
|
||||
* @param[in] dim_im_in_y input tensor dimention y
|
||||
* @param[in] dim_im_in_x input tensor dimension x
|
||||
* @param[in] dim_im_in_y input tensor dimension y
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -304,7 +304,7 @@ extern "C"
|
||||
* <code>RISCV_MATH_SIZE_MISMATCH</code> or <code>RISCV_MATH_SUCCESS</code> based on the outcome of size checking.
|
||||
*
|
||||
* This function is the version with full list of optimization tricks, but with
|
||||
* some contraints:
|
||||
* some constraints:
|
||||
* ch_im_in is multiple of 4
|
||||
* ch_im_out is multiple of 2
|
||||
*/
|
||||
@@ -333,8 +333,8 @@ extern "C"
|
||||
/**
|
||||
* @brief Fast Q7 version of 1x1 convolution (non-sqaure shape)
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in_x input tensor dimention x
|
||||
* @param[in] dim_im_in_y input tensor dimention y
|
||||
* @param[in] dim_im_in_x input tensor dimension x
|
||||
* @param[in] dim_im_in_y input tensor dimension y
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -360,7 +360,7 @@ extern "C"
|
||||
* second half of MobileNets after depthwise separable convolution.
|
||||
*
|
||||
* This function is the version with full list of optimization tricks, but with
|
||||
* some contraints:
|
||||
* some constraints:
|
||||
* ch_im_in is multiple of 4
|
||||
* ch_im_out is multiple of 2
|
||||
*/
|
||||
@@ -388,7 +388,7 @@ extern "C"
|
||||
/**
|
||||
* @brief Q7 version of convolution for RGB image
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in input tensor dimention
|
||||
* @param[in] dim_im_in input tensor dimension
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -429,7 +429,7 @@ extern "C"
|
||||
/**
|
||||
* @brief Fast Q15 convolution function
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in input tensor dimention
|
||||
* @param[in] dim_im_in input tensor dimension
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -447,7 +447,7 @@ extern "C"
|
||||
* <code>RISCV_MATH_SIZE_MISMATCH</code> or <code>RISCV_MATH_SUCCESS</code> based on the outcome of size checking.
|
||||
*
|
||||
* This function is the version with full list of optimization tricks, but with
|
||||
* some contraints:
|
||||
* some constraints:
|
||||
* ch_im_in is multiple of 2
|
||||
* ch_im_out is multiple of 2
|
||||
*/
|
||||
@@ -471,8 +471,8 @@ extern "C"
|
||||
/**
|
||||
* @brief Fast Q15 convolution function (non-sqaure shape)
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in_x input tensor dimention x
|
||||
* @param[in] dim_im_in_y input tensor dimention y
|
||||
* @param[in] dim_im_in_x input tensor dimension x
|
||||
* @param[in] dim_im_in_y input tensor dimension y
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -505,7 +505,7 @@ extern "C"
|
||||
*
|
||||
* ch_im_in is multiple of 2
|
||||
*
|
||||
* ch_im_out is multipe of 2
|
||||
* ch_im_out is multiple of 2
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -534,7 +534,7 @@ extern "C"
|
||||
/**
|
||||
* @brief Q7 depthwise separable convolution function
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in input tensor dimention
|
||||
* @param[in] dim_im_in input tensor dimension
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -552,7 +552,7 @@ extern "C"
|
||||
* <code>RISCV_MATH_SIZE_MISMATCH</code> or <code>RISCV_MATH_SUCCESS</code> based on the outcome of size checking.
|
||||
*
|
||||
* This function is the version with full list of optimization tricks, but with
|
||||
* some contraints:
|
||||
* some constraints:
|
||||
* ch_im_in is multiple of 2
|
||||
* ch_im_out is multiple of 2
|
||||
*/
|
||||
@@ -576,8 +576,8 @@ extern "C"
|
||||
/**
|
||||
* @brief Q7 depthwise separable convolution function (non-square shape)
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in_x input tensor dimention x
|
||||
* @param[in] dim_im_in_y input tensor dimention y
|
||||
* @param[in] dim_im_in_x input tensor dimension x
|
||||
* @param[in] dim_im_in_y input tensor dimension y
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] wt pointer to kernel weights
|
||||
* @param[in] ch_im_out number of filters, i.e., output tensor channels
|
||||
@@ -599,7 +599,7 @@ extern "C"
|
||||
* <code>RISCV_MATH_SIZE_MISMATCH</code> or <code>RISCV_MATH_SUCCESS</code> based on the outcome of size checking.
|
||||
*
|
||||
* This function is the version with full list of optimization tricks, but with
|
||||
* some contraints:
|
||||
* some constraints:
|
||||
* ch_im_in is multiple of 2
|
||||
* ch_im_out is multiple of 2
|
||||
*/
|
||||
@@ -986,7 +986,7 @@ extern "C"
|
||||
/**
|
||||
* @brief Q7 max pooling function
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in input tensor dimention
|
||||
* @param[in] dim_im_in input tensor dimension
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] dim_kernel filter kernel size
|
||||
* @param[in] padding padding sizes
|
||||
@@ -1011,7 +1011,7 @@ extern "C"
|
||||
/**
|
||||
* @brief Q7 average pooling function
|
||||
* @param[in] Im_in pointer to input tensor
|
||||
* @param[in] dim_im_in input tensor dimention
|
||||
* @param[in] dim_im_in input tensor dimension
|
||||
* @param[in] ch_im_in number of input tensor channels
|
||||
* @param[in] dim_kernel filter kernel size
|
||||
* @param[in] padding padding sizes
|
||||
@@ -1043,7 +1043,7 @@ extern "C"
|
||||
/**
|
||||
* @brief Q7 softmax function
|
||||
* @param[in] vec_in pointer to input vector
|
||||
* @param[in] dim_vec input vector dimention
|
||||
* @param[in] dim_vec input vector dimension
|
||||
* @param[out] p_out pointer to output vector
|
||||
* @return none.
|
||||
*
|
||||
@@ -1054,7 +1054,7 @@ extern "C"
|
||||
/**
|
||||
* @brief Q15 softmax function
|
||||
* @param[in] vec_in pointer to input vector
|
||||
* @param[in] dim_vec input vector dimention
|
||||
* @param[in] dim_vec input vector dimension
|
||||
* @param[out] p_out pointer to output vector
|
||||
* @return none.
|
||||
*
|
||||
@@ -1081,7 +1081,7 @@ extern "C"
|
||||
* @param[in] dilation_x Dilation along width. Not used and intended for future enhancement.
|
||||
* @param[in] dilation_y Dilation along height. Not used and intended for future enhancement.
|
||||
* @param[in] bias Pointer to optional bias values. If no bias is
|
||||
* availble, NULL is expected
|
||||
* available, NULL is expected
|
||||
* @param[in] input_offset Input tensor zero offset
|
||||
* @param[in] filter_offset Kernel tensor zero offset
|
||||
* @param[in] output_offset Output tensor zero offset
|
||||
|
||||
@@ -117,7 +117,24 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsCpupGuardCreator(VOID)
|
||||
return LOS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
Function : OsCpupDaemonInit
|
||||
Description: initialization of CPUP Daemon
|
||||
Input : None
|
||||
Return : LOS_OK or Error Information
|
||||
*****************************************************************************/
|
||||
LITE_OS_SEC_TEXT_INIT UINT32 OsCpupDaemonInit()
|
||||
{
|
||||
#if (LOSCFG_BASE_CORE_SWTMR == 1)
|
||||
(VOID)OsCpupGuardCreator();
|
||||
g_irqCpupInitFlg = 1;
|
||||
#endif
|
||||
|
||||
return LOS_OK;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
Function : OsCpupInit
|
||||
Description: initialization of CPUP
|
||||
@@ -127,32 +144,25 @@ Return : LOS_OK or Error Information
|
||||
LITE_OS_SEC_TEXT_INIT UINT32 OsCpupInit()
|
||||
{
|
||||
UINT32 size;
|
||||
CHAR *cpupMem = NULL;
|
||||
|
||||
size = g_taskMaxNum * sizeof(OsCpupCB);
|
||||
g_cpup = (OsCpupCB *)LOS_MemAlloc(m_aucSysMem0, size);
|
||||
|
||||
if (g_cpup == NULL) {
|
||||
return LOS_ERRNO_CPUP_NO_MEMORY;
|
||||
}
|
||||
|
||||
// Ignore the return code when matching CSEC rule 6.6(3).
|
||||
(VOID)memset_s(g_cpup, size, 0, size);
|
||||
g_cpupInitFlg = 1;
|
||||
|
||||
#if (LOSCFG_CPUP_INCLUDE_IRQ == 1)
|
||||
size = LOSCFG_PLATFORM_HWI_LIMIT * sizeof(OsIrqCpupCB);
|
||||
g_irqCpup = (OsIrqCpupCB *)LOS_MemAlloc(m_aucSysMem0, size);
|
||||
if (g_irqCpup == NULL) {
|
||||
size += LOSCFG_PLATFORM_HWI_LIMIT * sizeof(OsIrqCpupCB);
|
||||
#endif
|
||||
|
||||
cpupMem = LOS_MemAlloc(m_aucSysMem0, size);
|
||||
if (cpupMem == NULL) {
|
||||
return LOS_ERRNO_CPUP_NO_MEMORY;
|
||||
}
|
||||
(VOID)memset_s(cpupMem, size, 0, size);
|
||||
|
||||
(VOID)memset_s(g_irqCpup, size, 0, size);
|
||||
#if (LOSCFG_BASE_CORE_SWTMR == 1)
|
||||
(VOID)OsCpupGuardCreator();
|
||||
g_irqCpupInitFlg = 1;
|
||||
g_cpup = (OsCpupCB *)cpupMem;
|
||||
#if (LOSCFG_CPUP_INCLUDE_IRQ == 1)
|
||||
g_irqCpup = (OsIrqCpupCB *)(cpupMem + g_taskMaxNum * sizeof(OsCpupCB));
|
||||
#endif
|
||||
|
||||
#endif
|
||||
g_cpupInitFlg = 1;
|
||||
|
||||
return LOS_OK;
|
||||
}
|
||||
|
||||
@@ -171,6 +171,7 @@ typedef struct {
|
||||
*/
|
||||
extern UINT32 OsCpupInit(VOID);
|
||||
|
||||
extern UINT32 OsCpupDaemonInit(VOID);
|
||||
/**
|
||||
* @ingroup los_cpup
|
||||
* @brief Start task to get cycles count in current task ending.
|
||||
|
||||
@@ -33,6 +33,7 @@ module_name = get_path_info(rebase_path("."), "name")
|
||||
kernel_module(module_name) {
|
||||
sources = [
|
||||
"los_hwidump.c",
|
||||
"los_schedtrace.c",
|
||||
"los_stackdump.c",
|
||||
]
|
||||
configs += [ "$LITEOSTOPDIR:warn_config" ]
|
||||
|
||||
@@ -40,17 +40,46 @@ extern "C" {
|
||||
#endif /* __cplusplus */
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
/* StackDump print format */
|
||||
#define PRINT_PER_ROW 4
|
||||
|
||||
/* Shell Callback */
|
||||
/* SchedTrace records number */
|
||||
#define TRACE_NUM 200
|
||||
|
||||
/* sched trace info, users can add their own */
|
||||
typedef struct {
|
||||
UINT32 newTaskID;
|
||||
CHAR newTaskName[LOS_TASK_NAMELEN];
|
||||
UINT32 runTaskID;
|
||||
CHAR runTaskName[LOS_TASK_NAMELEN];
|
||||
} SchedTraceInfo;
|
||||
|
||||
/* SchedTrace record callback */
|
||||
typedef void (*SchedTraceRecordCB)(LosTaskCB *newTask, LosTaskCB *runTask);
|
||||
|
||||
/* SchedTrace show callback, buf is overwrite ringbuf, max amount of storage is TRACE_NUM */
|
||||
typedef void (*SchedTraceShowCB)(SchedTraceInfo *ringBuf, UINT32 count);
|
||||
|
||||
/* Shell callback */
|
||||
extern UINT32 OsShellCmdStackDump(INT32 argc, const CHAR **argv);
|
||||
extern UINT32 OsShellCmdHwiDump(INT32 argc, const CHAR **argv);
|
||||
extern UINT32 OsShellCmdSchedTrace(INT32 argc, const CHAR **argv);
|
||||
|
||||
/* other module Callback */
|
||||
/* Other module callback */
|
||||
extern VOID OsSchedTraceRecord(LosTaskCB *newTask, LosTaskCB *runTask);
|
||||
|
||||
/* External Interface */
|
||||
/* External interface */
|
||||
/* dump stack by task id, can be called at any time */
|
||||
extern VOID LOS_TaskStackDump(UINT32 taskID);
|
||||
|
||||
/* register sched trace handle, If not registered, the default fun will be used */
|
||||
extern VOID LOS_SchedTraceHandleRegister(SchedTraceRecordCB recordCB, SchedTraceShowCB showCB);
|
||||
/* start sched trace, will alloc buf, and start write to buf when sched */
|
||||
extern VOID LOS_SchedTraceStart(VOID);
|
||||
/* stop sched trace, will stop record and free buf */
|
||||
extern VOID LOS_SchedTraceStop(VOID);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ STATIC VOID ShellCmdHwiInfoShow(OsIrqCpupCB *irqData, CPUP_INFO_S *hwiCpup1s,
|
||||
}
|
||||
irqName = OsGetHwiFormName(i);
|
||||
|
||||
PRINTK(" %10u:%11u%11llu%10llu%9u.%-2u%9u.%-2u %-12s\n", i - OS_SYS_VECTOR_CNT, count, cycles, timeMax,
|
||||
PRINTK(" %10d:%11u%11llu%10llu%9u.%-2u%9u.%-2u %-12s\n", i - OS_SYS_VECTOR_CNT, count, cycles, timeMax,
|
||||
hwiCpup1s[i].uwUsage / CPUP_PRECISION_MULT, hwiCpup1s[i].uwUsage % CPUP_PRECISION_MULT,
|
||||
hwiCpup10s[i].uwUsage / CPUP_PRECISION_MULT, hwiCpup10s[i].uwUsage % CPUP_PRECISION_MULT,
|
||||
(irqName != NULL) ? irqName : NULL);
|
||||
|
||||
164
components/debugtools/los_schedtrace.c
Normal file
164
components/debugtools/los_schedtrace.c
Normal file
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
* Copyright (c) 2022-2022 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.
|
||||
*/
|
||||
|
||||
#include "los_debugtools.h"
|
||||
#include "securec.h"
|
||||
#include "los_debug.h"
|
||||
#include "los_memory.h"
|
||||
#include "los_arch.h"
|
||||
|
||||
#if (LOSCFG_DEBUG_TOOLS == 1)
|
||||
STATIC BOOL g_startTrace = FALSE;
|
||||
STATIC SchedTraceInfo *g_traceRingBuf = NULL;
|
||||
STATIC UINT32 g_schedCount = 0;
|
||||
STATIC SchedTraceRecordCB g_recordCB = NULL;
|
||||
STATIC SchedTraceShowCB g_showCB = NULL;
|
||||
|
||||
STATIC VOID DefaultShowFormat(SchedTraceInfo *buf, UINT32 count)
|
||||
{
|
||||
INT32 i;
|
||||
UINT32 cycle = count / TRACE_NUM;
|
||||
UINT32 point = count % TRACE_NUM;
|
||||
|
||||
PRINTK ("sched %u time, last %u is:\r\n", count, TRACE_NUM);
|
||||
PRINTK("RunTaskID RunTaskName NewTaskID NewTaskName \r\n");
|
||||
if (cycle > 0) {
|
||||
for (i = point; i < TRACE_NUM; i++) {
|
||||
PRINTK("%4u %20s, %4u %20s\n",
|
||||
g_traceRingBuf[i].runTaskID, g_traceRingBuf[i].runTaskName,
|
||||
g_traceRingBuf[i].newTaskID, g_traceRingBuf[i].newTaskName);
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < point; i++) {
|
||||
PRINTK("%4u %20s, %4u %20s\n",
|
||||
g_traceRingBuf[i].runTaskID, g_traceRingBuf[i].runTaskName,
|
||||
g_traceRingBuf[i].newTaskID, g_traceRingBuf[i].newTaskName);
|
||||
}
|
||||
|
||||
PRINTK("\r\n");
|
||||
}
|
||||
|
||||
STATIC VOID DefaultRecordHandle(LosTaskCB *newTask, LosTaskCB *runTask)
|
||||
{
|
||||
UINT32 point = g_schedCount % TRACE_NUM;
|
||||
|
||||
g_traceRingBuf[point].newTaskID = newTask->taskID;
|
||||
(VOID)memcpy_s(g_traceRingBuf[point].newTaskName, LOS_TASK_NAMELEN, newTask->taskName, LOS_TASK_NAMELEN);
|
||||
g_traceRingBuf[point].runTaskID = runTask->taskID;
|
||||
(VOID)memcpy_s(g_traceRingBuf[point].runTaskName, LOS_TASK_NAMELEN, runTask->taskName, LOS_TASK_NAMELEN);
|
||||
|
||||
g_schedCount++;
|
||||
}
|
||||
|
||||
STATIC VOID ShowFormat(SchedTraceInfo *buf, UINT32 count)
|
||||
{
|
||||
if (count == 0) {
|
||||
PRINT_ERR("none shed happened\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_showCB != NULL) {
|
||||
g_showCB(buf, count);
|
||||
}
|
||||
}
|
||||
|
||||
VOID OsSchedTraceRecord(LosTaskCB *newTask, LosTaskCB *runTask)
|
||||
{
|
||||
if (g_startTrace == FALSE) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_recordCB != NULL) {
|
||||
g_recordCB(newTask, runTask);
|
||||
}
|
||||
}
|
||||
|
||||
VOID LOS_SchedTraceStart(VOID)
|
||||
{
|
||||
if (g_recordCB == NULL) {
|
||||
g_recordCB = DefaultRecordHandle;
|
||||
}
|
||||
|
||||
g_traceRingBuf = (SchedTraceInfo *)LOS_MemAlloc(OS_SYS_MEM_ADDR, TRACE_NUM * sizeof(SchedTraceInfo));
|
||||
if (g_traceRingBuf == NULL) {
|
||||
PRINT_ERR("alloc failed for dump\n");
|
||||
return;
|
||||
}
|
||||
(VOID)memset_s(g_traceRingBuf, TRACE_NUM * sizeof(SchedTraceInfo), 0, TRACE_NUM * sizeof(SchedTraceInfo));
|
||||
|
||||
g_startTrace = TRUE;
|
||||
}
|
||||
|
||||
VOID LOS_SchedTraceStop(VOID)
|
||||
{
|
||||
if (g_showCB == NULL) {
|
||||
g_showCB = DefaultShowFormat;
|
||||
}
|
||||
g_startTrace = FALSE;
|
||||
ShowFormat(g_traceRingBuf, g_schedCount);
|
||||
g_schedCount = 0;
|
||||
|
||||
if (g_traceRingBuf != NULL) {
|
||||
(VOID)LOS_MemFree(OS_SYS_MEM_ADDR, g_traceRingBuf);
|
||||
g_traceRingBuf = NULL;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
VOID LOS_SchedTraceHandleRegister(SchedTraceRecordCB recordCB, SchedTraceShowCB showCB)
|
||||
{
|
||||
g_recordCB = recordCB;
|
||||
g_showCB = showCB;
|
||||
}
|
||||
|
||||
UINT32 OsShellCmdSchedTrace(INT32 argc, const CHAR **argv)
|
||||
{
|
||||
if (argc != 1) {
|
||||
PRINT_ERR("\nUsage: st -h\n");
|
||||
return LOS_NOK;
|
||||
}
|
||||
|
||||
if (strcmp(argv[0], "-s") == 0) {
|
||||
LOS_SchedTraceStart();
|
||||
} else if (strcmp(argv[0], "-e") == 0) {
|
||||
LOS_SchedTraceStop();
|
||||
} else if (strcmp(argv[0], "-h") == 0) {
|
||||
PRINTK("\nUsage: \nst -s , SchedTrace start\n");
|
||||
PRINTK("st -e , SchedTrace end and show\n");
|
||||
} else {
|
||||
PRINTK("\nUsage: st -h\n");
|
||||
return OS_ERROR;
|
||||
}
|
||||
|
||||
return LOS_OK;
|
||||
}
|
||||
#endif /* LOSCFG_STACK_DUMP == 1 */
|
||||
@@ -134,7 +134,7 @@ typedef struct {
|
||||
} SymInfo;
|
||||
|
||||
#define SYM_EXPORT(func) \
|
||||
const SymInfo sym_##func __attribute__((section(".sym."#func))) = { \
|
||||
const SymInfo sym_##func __attribute__((__used__, section(".sym."#func))) = { \
|
||||
.name = #func, \
|
||||
.addr = (UINTPTR)func \
|
||||
};
|
||||
@@ -149,7 +149,7 @@ const SymInfo sym_##func __attribute__((section(".sym."#func))) = { \
|
||||
* then the shared library will be loaded to the heap by pool.
|
||||
*
|
||||
* @note When the heap, pool, is not NULL, you should call LOS_MemInit() to initialize the
|
||||
* pool before calling LOS_SoLoad(). By the way, the system will comsume a certain amount
|
||||
* pool before calling LOS_SoLoad(). By the way, the system will consume a certain amount
|
||||
* of memory to initialize the pool. LOS_SoLoad must not be called in interrupt callback.
|
||||
*
|
||||
* @return Return NULL if error. Return non-NULL if success.
|
||||
|
||||
@@ -60,6 +60,6 @@ ${READELF} -l $1 | while read line; do
|
||||
done
|
||||
|
||||
NEED_SIZE=`tail -n 1 ${TMP_FILE}`
|
||||
echo "${NEED_SIZE} kb memory to reserve for $1!"
|
||||
echo "${NEED_SIZE} bytes memory to reserve for $1!"
|
||||
${RM} -f ${TMP_FILE}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include "los_compiler.h"
|
||||
|
||||
/* Using task extended field to realize IAR TLS function in target_config.h include this header file. */
|
||||
#define LOSCFG_TASK_STRUCT_EXTENSION VOID *iarTlsArea;
|
||||
#define LOSCFG_TASK_STRUCT_EXTENSION VOID *iarTlsArea
|
||||
|
||||
#if (__VER__ < 8000000)
|
||||
#include <yvals.h>
|
||||
|
||||
@@ -90,7 +90,7 @@ void sys_init(void)
|
||||
|
||||
u32_t sys_now(void)
|
||||
{
|
||||
/* Lwip docs mentioned like wraparound is not a problem in this funtion */
|
||||
/* Lwip docs mentioned like wraparound is not a problem in this function */
|
||||
return (u32_t)((LOS_TickCountGet() * OS_SYS_MS_PER_SECOND) /
|
||||
LOSCFG_BASE_CORE_TICK_PER_SECOND);
|
||||
}
|
||||
|
||||
@@ -94,6 +94,7 @@ extern INT32 VfsNormalizePath(const CHAR *directory, const CHAR *filename, CHAR
|
||||
extern INT32 OsShellCmdDate(INT32 argc, const CHAR **argv);
|
||||
extern INT32 OsShellCmdDumpTask(INT32 argc, const CHAR **argv);
|
||||
extern UINT32 OsShellCmdFree(INT32 argc, const CHAR **argv);
|
||||
extern UINT32 OsShellCmdWaterLine(INT32 argc, const CHAR **argv);
|
||||
extern UINT32 lwip_ifconfig(INT32 argc, const CHAR **argv);
|
||||
extern UINT32 OsShellPing(INT32 argc, const CHAR **argv);
|
||||
extern INT32 OsShellCmdTouch(INT32 argc, const CHAR **argv);
|
||||
|
||||
@@ -51,6 +51,9 @@ CmdItem g_shellcmdAll[] = {
|
||||
{CMD_TYPE_STD, "date", XARGS, (CmdCallBackFunc)OsShellCmdDate},
|
||||
{CMD_TYPE_EX, "task", 1, (CmdCallBackFunc)OsShellCmdDumpTask},
|
||||
{CMD_TYPE_EX, "free", XARGS, (CmdCallBackFunc)OsShellCmdFree},
|
||||
#if (LOSCFG_MEM_WATERLINE == 1)
|
||||
{CMD_TYPE_EX, "memusage", XARGS, (CmdCallBackFunc)OsShellCmdWaterLine},
|
||||
#endif
|
||||
#ifdef LWIP_SHELLCMD_ENABLE
|
||||
{CMD_TYPE_EX, "ifconfig", XARGS, (CmdCallBackFunc)lwip_ifconfig},
|
||||
{CMD_TYPE_EX, "ping", XARGS, (CmdCallBackFunc)OsShellPing},
|
||||
@@ -69,6 +72,7 @@ CmdItem g_shellcmdAll[] = {
|
||||
#if (LOSCFG_DEBUG_TOOLS == 1)
|
||||
{CMD_TYPE_EX, "stack", 1, (CmdCallBackFunc)OsShellCmdStackDump},
|
||||
{CMD_TYPE_EX, "hwi", 1, (CmdCallBackFunc)OsShellCmdHwiDump},
|
||||
{CMD_TYPE_EX, "st", 1, (CmdCallBackFunc)OsShellCmdSchedTrace},
|
||||
#endif
|
||||
{CMD_TYPE_EX, "help", 0, (CmdCallBackFunc)OsShellCmdHelp},
|
||||
};
|
||||
@@ -82,7 +86,7 @@ CmdModInfo *OsCmdInfoGet(VOID)
|
||||
* Description: Pass in the string and clear useless space ,which include:
|
||||
* 1) The overmatch space which is not be marked by Quote's area
|
||||
* Squeeze the overmatch space into one space
|
||||
* 2) Clear all space before first vaild character
|
||||
* 2) Clear all space before first valid character
|
||||
* Input: cmdKey : Pass in the buff string, which is ready to be operated
|
||||
* cmdOut : Pass out the buffer string ,which has already been operated
|
||||
* size : cmdKey length
|
||||
@@ -111,7 +115,7 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsCmdKeyShift(const CHAR *cmdKey, CHAR *cmdOut, UI
|
||||
(VOID)memset_s(output, len + 1, 0, len + 1);
|
||||
/* Backup the 'output' start address */
|
||||
outputBak = output;
|
||||
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invaild charactor */
|
||||
/* Scan each charactor in 'cmdKey',and squeeze the overmuch space and ignore invalid charactor */
|
||||
for (; *cmdKey != '\0'; cmdKey++) {
|
||||
/* Detected a Double Quotes, switch the matching status */
|
||||
if (*(cmdKey) == '\"') {
|
||||
|
||||
@@ -49,7 +49,7 @@ LITE_OS_SEC_TEXT_MINOR STATIC UINT32 OsShellCmdFreeInfo(INT32 argc, const CHAR *
|
||||
if ((argc == 0) ||
|
||||
((argc == 1) && (strcmp(argv[0], "-k") == 0)) ||
|
||||
((argc == 1) && (strcmp(argv[0], "-m") == 0))) {
|
||||
PRINTK("\r\n total used free\n");
|
||||
PRINTK("\n total used free\n");
|
||||
}
|
||||
|
||||
if ((argc == 1) && (strcmp(argv[0], "-k") == 0)) {
|
||||
@@ -79,3 +79,32 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsShellCmdFree(INT32 argc, const CHAR *argv[])
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (LOSCFG_MEM_WATERLINE == 1)
|
||||
LITE_OS_SEC_TEXT_MINOR UINT32 OsShellCmdWaterLine(INT32 argc, const CHAR *argv[])
|
||||
{
|
||||
UINT32 ret;
|
||||
LOS_MEM_POOL_STATUS poolStatus;
|
||||
|
||||
if (argc > 1) {
|
||||
PRINTK("\nUsage: memusage or memusage [-k/-m]\n");
|
||||
return OS_ERROR;
|
||||
}
|
||||
|
||||
if (LOS_MemInfoGet(m_aucSysMem0, &poolStatus) != LOS_OK) {
|
||||
return OS_ERROR;
|
||||
}
|
||||
|
||||
if ((argc == 1) && (strcmp(argv[0], "-k") == 0)) {
|
||||
PRINTK("Mem WaterLine: %-9u\n", MEM_SIZE_TO_KB(poolStatus.usageWaterLine));
|
||||
} else if ((argc == 1) && (strcmp(argv[0], "-m") == 0)) {
|
||||
PRINTK("Mem WaterLine: %-9u\n", MEM_SIZE_TO_MB(poolStatus.usageWaterLine));
|
||||
} else if (argc == 0) {
|
||||
PRINTK("Mem WaterLine: %-9u\n", poolStatus.usageWaterLine);
|
||||
} else {
|
||||
PRINTK("\nUsage: memusage or memusage [-k/-m]\n");
|
||||
return OS_ERROR;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -14,7 +14,7 @@ config TRACE_FRAME_CORE_MSG
|
||||
depends on TRACE_MSG_EXTEND
|
||||
|
||||
config TRACE_FRAME_EVENT_COUNT
|
||||
bool "Record event count, which indicate the sequence of happend events"
|
||||
bool "Record event count, which indicate the sequence of happened events"
|
||||
default n
|
||||
depends on TRACE_MSG_EXTEND
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ typedef enum {
|
||||
|
||||
/**
|
||||
* @ingroup los_trace
|
||||
* Trace event type which indicate the exactly happend events, user can define own module's event type like
|
||||
* Trace event type which indicate the exactly happened events, user can define own module's event type like
|
||||
* TRACE_#MODULE#_FLAG | NUMBER.
|
||||
* 28 4
|
||||
* 0 0 0 0 0 0 0 0 X X X X X X X X 0 0 0 0 0 0
|
||||
@@ -241,7 +241,7 @@ typedef struct {
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_TRACE_FRAME_EVENT_COUNT == 1)
|
||||
UINT32 eventCount; /**< the sequence of happend events */
|
||||
UINT32 eventCount; /**< the sequence of happened events */
|
||||
#endif
|
||||
|
||||
UINTPTR params[LOSCFG_TRACE_FRAME_MAX_PARAMS]; /**< event frame's params */
|
||||
@@ -350,8 +350,8 @@ extern TRACE_EVENT_HOOK g_traceEventHook;
|
||||
#define QUEUE_CREATE_PARAMS(queueId, queueSz, itemSz, queueAddr, memType) \
|
||||
queueId, queueSz, itemSz, queueAddr, memType
|
||||
#define QUEUE_DELETE_PARAMS(queueId, state, readable) queueId, state, readable
|
||||
#define QUEUE_RW_PARAMS(queueId, queueSize, bufSize, operateType, readable, writeable, timeout) \
|
||||
queueId, queueSize, bufSize, operateType, readable, writeable, timeout
|
||||
#define QUEUE_RW_PARAMS(queueId, queueSize, bufSize, operateType, readable, writable, timeout) \
|
||||
queueId, queueSize, bufSize, operateType, readable, writable, timeout
|
||||
|
||||
#define SEM_CREATE_PARAMS(semId, type, count) semId, type, count
|
||||
#define SEM_DELETE_PARAMS(semId, delRetCode) semId, delRetCode
|
||||
|
||||
@@ -4,7 +4,7 @@ config DRIVERS
|
||||
help
|
||||
Answer Y to enable LiteOS support driver.
|
||||
|
||||
source "../../drivers/adapter/khdf/liteos_m/Kconfig"
|
||||
source "../../drivers/hdf_core/adapter/khdf/liteos_m/Kconfig"
|
||||
|
||||
# Device driver Kconfig import
|
||||
osource "$(DEVICE_PATH)/drivers/Kconfig"
|
||||
|
||||
@@ -692,11 +692,6 @@ osTimerId_t osTimerNew(osTimerFunc_t func, osTimerType_t type, void *argument, c
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (osTimerOnce == type) {
|
||||
mode = LOS_SWTMR_MODE_NO_SELFDELETE;
|
||||
} else {
|
||||
mode = LOS_SWTMR_MODE_PERIOD;
|
||||
}
|
||||
#if (LOSCFG_BASE_CORE_SWTMR_ALIGN == 1)
|
||||
if (LOS_SwtmrCreate(1, mode, (SWTMR_PROC_FUNC)func, &swtmrId, (UINT32)(UINTPTR)argument,
|
||||
osTimerRousesAllow, osTimerAlignIgnore) != LOS_OK) {
|
||||
|
||||
@@ -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) 2020-2022 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:
|
||||
@@ -32,6 +32,7 @@ import("//kernel/liteos_m/liteos.gni")
|
||||
module_name = get_path_info(rebase_path("."), "name")
|
||||
module_group(module_name) {
|
||||
modules = [
|
||||
"iccarm",
|
||||
"musl",
|
||||
"newlib",
|
||||
]
|
||||
|
||||
@@ -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) 2020-2022 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:
|
||||
@@ -41,4 +41,8 @@ config LIBC_NEWLIB
|
||||
bool "newlibc"
|
||||
rsource "newlib/Kconfig"
|
||||
|
||||
config LIBC_ICCARM
|
||||
bool "iar libc"
|
||||
rsource "iccarm/Kconfig"
|
||||
|
||||
endchoice
|
||||
|
||||
42
kal/libc/iccarm/BUILD.gn
Normal file
42
kal/libc/iccarm/BUILD.gn
Normal file
@@ -0,0 +1,42 @@
|
||||
# Copyright (c) 2022-2022 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")
|
||||
import("//third_party/musl/porting/liteos_m_iccarm/kernel/iccarm.gni")
|
||||
|
||||
module_switch = defined(LOSCFG_LIBC_ICCARM)
|
||||
module_name = get_path_info(rebase_path("."), "name")
|
||||
kernel_module(module_name) {
|
||||
configs += [ "$LITEOSTOPDIR:warn_config" ]
|
||||
|
||||
deps = [ "//third_party/musl/porting/liteos_m_iccarm/kernel" ]
|
||||
}
|
||||
|
||||
config("public") {
|
||||
include_dirs = ICCARM_ADAPT_INCLUDE_DIRS
|
||||
}
|
||||
38
kal/libc/iccarm/Kconfig
Normal file
38
kal/libc/iccarm/Kconfig
Normal file
@@ -0,0 +1,38 @@
|
||||
# Copyright (c) 2022-2022 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.
|
||||
|
||||
if LIBC_ICCARM
|
||||
|
||||
config LIBC_ICCARM_FS
|
||||
bool "Enable POSIX file system API support"
|
||||
default y
|
||||
depends on FS_VFS
|
||||
help
|
||||
This enables POSIX style file system related APIs.
|
||||
|
||||
endif # LIBC_ICCARM
|
||||
@@ -46,4 +46,11 @@
|
||||
|
||||
#include_next <sys/select.h>
|
||||
|
||||
#ifdef LOSCFG_ARCH_RISCV
|
||||
#ifdef FD_ISSET(d, s)
|
||||
#undef FD_ISSET(d, s)
|
||||
#define FD_ISSET(d, s) !!((s)->fds_bits[(d)/(8*sizeof(long))] & (1UL<<((d)%(8*sizeof(long)))))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //_ADAPT_SYS_SELECT_H
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
#define PTHREAD_NAMELEN 16
|
||||
#define PTHREAD_KEY_UNUSED 0
|
||||
#define PTHREAD_KEY_USED 1
|
||||
#define PTHREAD_TASK_INVAILD 0
|
||||
#define PTHREAD_TASK_INVALID 0
|
||||
|
||||
typedef void (*PthreadKeyDtor)(void *);
|
||||
typedef struct {
|
||||
@@ -399,7 +399,7 @@ STATIC UINT32 DoPthreadCancel(LosTaskCB *task)
|
||||
LOS_TaskLock();
|
||||
pthreadData = (PthreadData *)(UINTPTR)task->arg;
|
||||
pthreadData->canceled = 0;
|
||||
if ((task->taskStatus == PTHREAD_TASK_INVAILD) || (LOS_TaskSuspend(task->taskID) != LOS_OK)) {
|
||||
if ((task->taskStatus == PTHREAD_TASK_INVALID) || (LOS_TaskSuspend(task->taskID) != LOS_OK)) {
|
||||
ret = LOS_NOK;
|
||||
goto OUT;
|
||||
}
|
||||
|
||||
@@ -638,10 +638,8 @@ extern UINT8 *m_aucSysMem0;
|
||||
/**
|
||||
* @ingroup los_config
|
||||
* Task extension field additional functions, such as IAR TLS.
|
||||
* Please Use the LOSCFG_TASK_STRUCT_EXTENSION macro to define your task extended fields in target_config.h
|
||||
*/
|
||||
#ifndef LOSCFG_TASK_STRUCT_EXTENSION
|
||||
#define LOSCFG_TASK_STRUCT_EXTENSION
|
||||
#endif
|
||||
#ifndef LOSCFG_TASK_CREATE_EXTENSION_HOOK
|
||||
#define LOSCFG_TASK_CREATE_EXTENSION_HOOK(taskCB)
|
||||
#endif
|
||||
|
||||
@@ -238,7 +238,7 @@ extern VOID LOS_ShowBox(VOID *pool);
|
||||
*
|
||||
* @param boxMem [IN] Type #VOID* Pointer to the calculate membox.
|
||||
* @param maxBlk [OUT] Type #UINT32* Record membox max block.
|
||||
* @param blkCnt [OUT] Type #UINT32* Record membox block count alreay allocated.
|
||||
* @param blkCnt [OUT] Type #UINT32* Record membox block count already allocated.
|
||||
* @param blkSize [OUT] Type #UINT32* Record membox block size.
|
||||
*
|
||||
* @retval #LOS_OK The heap status calculate success.
|
||||
|
||||
@@ -1500,7 +1500,9 @@ typedef struct {
|
||||
#if (LOSCFG_KERNEL_SIGNAL == 1)
|
||||
VOID *sig; /**< Task signal */
|
||||
#endif
|
||||
LOSCFG_TASK_STRUCT_EXTENSION /**< Task extension field */
|
||||
#ifdef LOSCFG_TASK_STRUCT_EXTENSION
|
||||
LOSCFG_TASK_STRUCT_EXTENSION; /**< Task extension field */
|
||||
#endif
|
||||
} LosTaskCB;
|
||||
|
||||
STATIC INLINE BOOL OsTaskIsExit(const LosTaskCB *taskCB)
|
||||
|
||||
@@ -157,6 +157,10 @@ extern UINT32 g_sysClock;
|
||||
#define OS_SYS_NS_TO_CYCLE(time, freq) (((time) / OS_SYS_NS_PER_SECOND) * (freq) + \
|
||||
((time) % OS_SYS_NS_PER_SECOND) * (freq) / OS_SYS_NS_PER_SECOND)
|
||||
|
||||
#define OS_SYS_TICK_TO_CYCLE(ticks) (((UINT64)(ticks) * g_sysClock) / LOSCFG_BASE_CORE_TICK_PER_SECOND)
|
||||
|
||||
#define OS_SYS_CYCLE_TO_TICK(cycle) ((((UINT64)(cycle)) * LOSCFG_BASE_CORE_TICK_PER_SECOND) / g_sysClock)
|
||||
|
||||
/**
|
||||
* @ingroup los_tick
|
||||
* System time basic function error code: Null pointer.
|
||||
|
||||
@@ -181,6 +181,14 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_KernelInit(VOID)
|
||||
OsTaskMonInit();
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_BASE_CORE_CPUP == 1)
|
||||
ret = OsCpupInit();
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("OsCpupInit error\n");
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_BASE_IPC_SEM == 1)
|
||||
ret = OsSemInit();
|
||||
if (ret != LOS_OK) {
|
||||
@@ -211,12 +219,12 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_KernelInit(VOID)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_BASE_CORE_CPUP == 1)
|
||||
ret = OsCpupInit();
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("OsCpupInit error\n");
|
||||
return ret;
|
||||
}
|
||||
#if (LOSCFG_CPUP_INCLUDE_IRQ == 1)
|
||||
ret = OsCpupDaemonInit();
|
||||
if (ret != LOS_OK) {
|
||||
PRINT_ERR("OsCpupDaemonInit error\n");
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_FS_VFS == 1)
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
#if (LOSCFG_KERNEL_PM == 1)
|
||||
#include "los_pm.h"
|
||||
#endif
|
||||
#if (LOSCFG_DEBUG_TOOLS == 1)
|
||||
#include "los_debugtools.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#if __cplusplus
|
||||
@@ -547,6 +550,9 @@ BOOL OsSchedTaskSwitch(VOID)
|
||||
isTaskSwitch = TRUE;
|
||||
|
||||
OsHookCall(LOS_HOOK_TYPE_TASK_SWITCHEDIN);
|
||||
#if (LOSCFG_DEBUG_TOOLS == 1)
|
||||
OsSchedTraceRecord(newTask, runTask);
|
||||
#endif
|
||||
}
|
||||
|
||||
OsSchedTaskDeQueue(newTask);
|
||||
|
||||
@@ -97,7 +97,7 @@ VOID OsAdd2SortLink(SortLinkList *node, UINT64 startTime, UINT32 waitTicks, Sort
|
||||
}
|
||||
|
||||
intSave = LOS_IntLock();
|
||||
SET_SORTLIST_VALUE(node, startTime + (UINT64)waitTicks * OS_CYCLE_PER_TICK);
|
||||
SET_SORTLIST_VALUE(node, startTime + OS_SYS_TICK_TO_CYCLE(waitTicks));
|
||||
OsAddNode2SortLink(sortLinkHead, node);
|
||||
LOS_IntRestore(intSave);
|
||||
}
|
||||
|
||||
@@ -141,8 +141,8 @@ LITE_OS_SEC_TEXT_INIT UINT32 OsSwtmrTaskCreate(VOID)
|
||||
STATIC UINT64 OsSwtmrCalcStartTime(UINT64 currTime, SWTMR_CTRL_S *swtmr, const SWTMR_CTRL_S *alignSwtmr)
|
||||
{
|
||||
UINT64 usedTime, startTime;
|
||||
UINT64 alignEnd = (UINT64)alignSwtmr->uwInterval * OS_CYCLE_PER_TICK;
|
||||
UINT64 swtmrTime = (UINT64)swtmr->uwInterval * OS_CYCLE_PER_TICK;
|
||||
UINT64 alignEnd = OS_SYS_TICK_TO_CYCLE(alignSwtmr->uwInterval);
|
||||
UINT64 swtmrTime = OS_SYS_TICK_TO_CYCLE(swtmr->uwInterval);
|
||||
UINT64 remainTime = OsSortLinkGetRemainTime(currTime, &alignSwtmr->stSortList);
|
||||
if (remainTime == 0) {
|
||||
startTime = GET_SORTLIST_VALUE(&alignSwtmr->stSortList);
|
||||
@@ -357,7 +357,7 @@ LITE_OS_SEC_TEXT UINT32 OsSwtmrGetNextTimeout(VOID)
|
||||
UINT32 intSave = LOS_IntLock();
|
||||
UINT64 time = OsSortLinkGetNextExpireTime(g_swtmrSortLinkList);
|
||||
LOS_IntRestore(intSave);
|
||||
time = time / OS_CYCLE_PER_TICK;
|
||||
time = OS_SYS_CYCLE_TO_TICK(time);
|
||||
if (time > OS_NULL_INT) {
|
||||
time = OS_NULL_INT;
|
||||
}
|
||||
@@ -367,7 +367,7 @@ LITE_OS_SEC_TEXT UINT32 OsSwtmrGetNextTimeout(VOID)
|
||||
LITE_OS_SEC_TEXT UINT32 OsSwtmrTimeGet(const SWTMR_CTRL_S *swtmr)
|
||||
{
|
||||
UINT64 time = OsSortLinkGetTargetExpireTime(OsGetCurrSchedTimeCycle(), &swtmr->stSortList);
|
||||
time = time / OS_CYCLE_PER_TICK;
|
||||
time = OS_SYS_CYCLE_TO_TICK(time);
|
||||
if (time > OS_NULL_INT) {
|
||||
time = OS_NULL_INT;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ STATIC VOID OsRecycleTaskResources(LosTaskCB *taskCB, UINTPTR *stackPtr)
|
||||
}
|
||||
}
|
||||
|
||||
STATIC VOID OsRecyleFinishedTask(VOID)
|
||||
STATIC VOID OsRecycleFinishedTask(VOID)
|
||||
{
|
||||
LosTaskCB *taskCB = NULL;
|
||||
UINT32 intSave;
|
||||
@@ -197,7 +197,7 @@ UINT32 OsPmEnterHandlerSet(VOID (*func)(VOID))
|
||||
LITE_OS_SEC_TEXT VOID OsIdleTask(VOID)
|
||||
{
|
||||
while (1) {
|
||||
OsRecyleFinishedTask();
|
||||
OsRecycleFinishedTask();
|
||||
|
||||
if (PmEnter != NULL) {
|
||||
PmEnter();
|
||||
@@ -307,18 +307,28 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskCpupInfo(CPUP_INFO_S **cpuLessOneSec,
|
||||
LITE_OS_SEC_TEXT_MINOR VOID OsPrintAllTskInfoHeader(VOID)
|
||||
{
|
||||
PRINTK("\r\n TID Priority Status StackSize WaterLine StackPoint TopOfStack EventMask SemID");
|
||||
#if (LOSCFG_TASK_MEM_USED == 1)
|
||||
PRINTK(" AllocSize");
|
||||
#endif
|
||||
#if (LOSCFG_BASE_CORE_CPUP == 1)
|
||||
PRINTK(" CPUUSE CPUUSE10s CPUUSE1s ");
|
||||
#endif /* LOSCFG_BASE_CORE_CPUP */
|
||||
PRINTK(" TaskEntry name\n");
|
||||
PRINTK(" --- -------- -------- ");
|
||||
PRINTK("--------- --------- ---------- ---------- --------- ------ ");
|
||||
#if (LOSCFG_TASK_MEM_USED == 1)
|
||||
PRINTK("--------- ");
|
||||
#endif
|
||||
#if (LOSCFG_BASE_CORE_CPUP == 1)
|
||||
PRINTK("------- --------- -------- ");
|
||||
#endif /* LOSCFG_BASE_CORE_CPUP */
|
||||
PRINTK("---------- ----\n");
|
||||
}
|
||||
|
||||
#if (LOSCFG_TASK_MEM_USED == 1)
|
||||
STATIC UINT32 g_taskMemUsed[LOSCFG_BASE_CORE_TSK_LIMIT + 1];
|
||||
#endif
|
||||
|
||||
/*****************************************************************************
|
||||
Function : OsGetAllTskInfo
|
||||
Description : Get all task info.
|
||||
@@ -338,6 +348,11 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskInfo(VOID)
|
||||
CPUP_INFO_S *cpuOneSec = (CPUP_INFO_S *)NULL;
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_TASK_MEM_USED == 1)
|
||||
(VOID)memset_s(g_taskMemUsed, sizeof(UINT32) * g_taskMaxNum, 0, sizeof(UINT32) * g_taskMaxNum);
|
||||
OsTaskMemUsed((VOID *)OS_SYS_MEM_ADDR, g_taskMemUsed, g_taskMaxNum);
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_BASE_CORE_CPUP == 1)
|
||||
if (OsGetAllTskCpupInfo(&cpuLessOneSec, &cpuTenSec, &cpuOneSec) != LOS_OK) {
|
||||
return OS_ERROR;
|
||||
@@ -357,6 +372,9 @@ LITE_OS_SEC_TEXT_MINOR UINT32 OsGetAllTskInfo(VOID)
|
||||
taskCB->taskID, taskCB->priority, OsConvertTskStatus(taskCB->taskStatus),
|
||||
taskCB->stackSize, OsGetTaskWaterLine(taskCB->taskID),
|
||||
(UINT32)(UINTPTR)taskCB->stackPointer, taskCB->topOfStack, taskCB->eventMask, semID);
|
||||
#if (LOSCFG_TASK_MEM_USED == 1)
|
||||
PRINTK("%#10x", g_taskMemUsed[loopNum]);
|
||||
#endif
|
||||
|
||||
#if (LOSCFG_BASE_CORE_CPUP == 1)
|
||||
PRINTK("%6u.%-2u%7u.%-2u%6u.%-2u ",
|
||||
@@ -759,7 +777,7 @@ LITE_OS_SEC_TEXT_INIT UINT32 LOS_TaskCreateOnly(UINT32 *taskID, TSK_INIT_PARAM_S
|
||||
return retVal;
|
||||
}
|
||||
|
||||
OsRecyleFinishedTask();
|
||||
OsRecycleFinishedTask();
|
||||
|
||||
intSave = LOS_IntLock();
|
||||
if (LOS_ListEmpty(&g_losFreeTask)) {
|
||||
@@ -1508,5 +1526,5 @@ LITE_OS_SEC_TEXT_MINOR VOID LOS_Msleep(UINT32 mSecs)
|
||||
|
||||
VOID LOS_TaskResRecycle(VOID)
|
||||
{
|
||||
OsRecyleFinishedTask();
|
||||
OsRecycleFinishedTask();
|
||||
}
|
||||
|
||||
@@ -49,13 +49,17 @@ LITE_OS_SEC_BSS STATIC UINT64 g_tickTimerStartTime;
|
||||
#if (LOSCFG_BASE_CORE_TICK_WTIMER == 0)
|
||||
STATIC UINT64 g_tickTimerBase;
|
||||
STATIC UINT64 g_oldTickTimerBase;
|
||||
STATIC BOOL g_tickTimerBaseUpdate = FALSE;
|
||||
|
||||
LITE_OS_SEC_TEXT STATIC VOID OsUpdateSysTimeBase(VOID)
|
||||
{
|
||||
UINT32 period = 0;
|
||||
|
||||
(VOID)g_sysTickTimer->getCycle(&period);
|
||||
g_tickTimerBase += period;
|
||||
if (g_tickTimerBaseUpdate == FALSE) {
|
||||
(VOID)g_sysTickTimer->getCycle(&period);
|
||||
g_tickTimerBase += period;
|
||||
}
|
||||
g_tickTimerBaseUpdate = FALSE;
|
||||
}
|
||||
|
||||
LITE_OS_SEC_TEXT VOID OsTickTimerBaseReset(UINT64 currTime)
|
||||
@@ -96,6 +100,7 @@ LITE_OS_SEC_TEXT UINT64 LOS_SysCycleGet(VOID)
|
||||
/* Turn the timer count */
|
||||
g_tickTimerBase += period;
|
||||
schedTime = g_tickTimerBase + time;
|
||||
g_tickTimerBaseUpdate = TRUE;
|
||||
}
|
||||
|
||||
LOS_ASSERT(schedTime >= g_oldTickTimerBase);
|
||||
@@ -285,7 +290,7 @@ Return : current tick
|
||||
*****************************************************************************/
|
||||
LITE_OS_SEC_TEXT_MINOR UINT64 LOS_TickCountGet(VOID)
|
||||
{
|
||||
return (LOS_SysCycleGet() - g_tickTimerStartTime) / g_cyclesPerTick;
|
||||
return OS_SYS_CYCLE_TO_TICK(LOS_SysCycleGet() - g_tickTimerStartTime);
|
||||
}
|
||||
|
||||
/*****************************************************************************
|
||||
|
||||
@@ -52,7 +52,7 @@ import("$root_out_dir/config.gni")
|
||||
|
||||
LITEOSTOPDIR = "//kernel/liteos_m"
|
||||
LITEOSTHIRDPARTY = "//third_party"
|
||||
HDFTOPDIR = "//drivers/adapter/khdf/liteos_m"
|
||||
HDFTOPDIR = "//drivers/hdf_core/adapter/khdf/liteos_m"
|
||||
|
||||
ARCH = ""
|
||||
if (defined(LOSCFG_ARCH_ARM_AARCH32)) {
|
||||
|
||||
@@ -181,7 +181,7 @@ typedef enum EXCn {
|
||||
#define __ICACHE_PRESENT 0 /*!< Set to 1 if I-Cache is present */
|
||||
#define __DCACHE_PRESENT 0 /*!< Set to 1 if D-Cache is present */
|
||||
#define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
|
||||
#define __Vendor_EXCEPTION 0 /*!< Set to 1 if vendor exception hander is present */
|
||||
#define __Vendor_EXCEPTION 0 /*!< Set to 1 if vendor exception handler is present */
|
||||
|
||||
/** @} */ /* End of group Configuration_of_CMSIS */
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/****************** C Compilers dependant keywords ****************************/
|
||||
/****************** C Compilers dependent keywords ****************************/
|
||||
/* In HS mode and when the DMA is used, all variables and data structures dealing
|
||||
with the DMA during the transaction process should be 4-bytes aligned */
|
||||
#ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED
|
||||
|
||||
@@ -195,7 +195,7 @@ typedef enum EXCn {
|
||||
#define __ICACHE_PRESENT 0 /*!< Set to 1 if I-Cache is present */
|
||||
#define __DCACHE_PRESENT 0 /*!< Set to 1 if D-Cache is present */
|
||||
#define __Vendor_SysTickConfig 0 /*!< Set to 1 if different SysTick Config is used */
|
||||
#define __Vendor_EXCEPTION 0 /*!< Set to 1 if vendor exception hander is present */
|
||||
#define __Vendor_EXCEPTION 0 /*!< Set to 1 if vendor exception handler is present */
|
||||
|
||||
/** @} */ /* End of group Configuration_of_CMSIS */
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ OF SUCH DAMAGE.
|
||||
/* USARTx_CTL1 */
|
||||
#define USART_CTL1_ADDR BITS(0,3) /*!< address of USART */
|
||||
#define USART_CTL1_LBLEN BIT(5) /*!< LIN break frame length */
|
||||
#define USART_CTL1_LBDIE BIT(6) /*!< LIN break detected interrupt eanble */
|
||||
#define USART_CTL1_LBDIE BIT(6) /*!< LIN break detected interrupt enable */
|
||||
#define USART_CTL1_CLEN BIT(8) /*!< CK length */
|
||||
#define USART_CTL1_CPH BIT(9) /*!< CK phase */
|
||||
#define USART_CTL1_CPL BIT(10) /*!< CK polarity */
|
||||
|
||||
@@ -386,11 +386,11 @@ static uint32_t usbd_int_rxfifo (usb_core_driver *udev)
|
||||
break;
|
||||
|
||||
case RSTAT_XFER_COMP:
|
||||
/* trigger the OUT enpoint interrupt */
|
||||
/* trigger the OUT endpoint interrupt */
|
||||
break;
|
||||
|
||||
case RSTAT_SETUP_COMP:
|
||||
/* trigger the OUT enpoint interrupt */
|
||||
/* trigger the OUT endpoint interrupt */
|
||||
break;
|
||||
|
||||
case RSTAT_SETUP_UPDT:
|
||||
|
||||
@@ -56,7 +56,7 @@ void usbd_init (usb_core_driver *udev, usb_core_enum core, usb_class_core *class
|
||||
/* device descriptor, class and user callbacks */
|
||||
udev->dev.class_core = class_core;
|
||||
|
||||
/* configure USB capabilites */
|
||||
/* configure USB capabilities */
|
||||
usb_basic_init (&udev->bp, &udev->regs, core);
|
||||
|
||||
/* initailizes the USB core*/
|
||||
|
||||
@@ -214,7 +214,7 @@ void usbh_core_task (usb_core_driver *pudev, usbh_host *puhost)
|
||||
break;
|
||||
|
||||
case HOST_CLASS_ENUM:
|
||||
/* process class standard contol requests state machine */
|
||||
/* process class standard control requests state machine */
|
||||
status = puhost->class_cb->class_requests(pudev, puhost);
|
||||
|
||||
if (USBH_OK == status) {
|
||||
|
||||
@@ -182,7 +182,7 @@ ErrStatus can_init(uint32_t can_periph, can_parameter_struct* can_parameter_init
|
||||
}else{
|
||||
CAN_CTL(can_periph) &= ~CAN_CTL_TTC;
|
||||
}
|
||||
/* automatic bus-off managment */
|
||||
/* automatic bus-off management */
|
||||
if(ENABLE == can_parameter_init->auto_bus_off_recovery){
|
||||
CAN_CTL(can_periph) |= CAN_CTL_ABOR;
|
||||
}else{
|
||||
|
||||
@@ -665,7 +665,7 @@ void dma_interrupt_flag_clear(uint32_t dma_periph, dma_channel_enum channelx, ui
|
||||
\param[in] channelx: specify which DMA channel
|
||||
only one parameter can be selected which is shown as below:
|
||||
\arg DMA0: DMA_CHx(x=0..6), DMA1: DMA_CHx(x=0..4)
|
||||
\param[in] source: specify which interrupt to enbale
|
||||
\param[in] source: specify which interrupt to enable
|
||||
one or more parameters can be selected which are shown as below
|
||||
\arg DMA_INT_FTF: channel full transfer finish interrupt
|
||||
\arg DMA_INT_HTF: channel half transfer finish interrupt
|
||||
@@ -689,7 +689,7 @@ void dma_interrupt_enable(uint32_t dma_periph, dma_channel_enum channelx, uint32
|
||||
\param[in] channelx: specify which DMA channel
|
||||
only one parameter can be selected which is shown as below:
|
||||
\arg DMA0: DMA_CHx(x=0..6), DMA1: DMA_CHx(x=0..4)
|
||||
\param[in] source: specify which interrupt to disbale
|
||||
\param[in] source: specify which interrupt to disable
|
||||
one or more parameters can be selected which are shown as below
|
||||
\arg DMA_INT_FTF: channel full transfer finish interrupt
|
||||
\arg DMA_INT_HTF: channel half transfer finish interrupt
|
||||
|
||||
@@ -244,7 +244,7 @@ void rtc_interrupt_flag_clear(uint32_t flag)
|
||||
|
||||
/*!
|
||||
\brief enable RTC interrupt
|
||||
\param[in] interrupt: specify which interrupt to enbale
|
||||
\param[in] interrupt: specify which interrupt to enable
|
||||
one or more parameters can be selected which are shown as below:
|
||||
\arg RTC_INT_SECOND: second interrupt
|
||||
\arg RTC_INT_ALARM: alarm interrupt
|
||||
@@ -259,7 +259,7 @@ void rtc_interrupt_enable(uint32_t interrupt)
|
||||
|
||||
/*!
|
||||
\brief disable RTC interrupt
|
||||
\param[in] interrupt: specify which interrupt to disbale
|
||||
\param[in] interrupt: specify which interrupt to disable
|
||||
one or more parameters can be selected which are shown as below:
|
||||
\arg RTC_INT_SECOND: second interrupt
|
||||
\arg RTC_INT_ALARM: alarm interrupt
|
||||
|
||||
@@ -80,7 +80,7 @@ void spi_i2s_deinit(uint32_t spi_periph)
|
||||
|
||||
/*!
|
||||
\brief initialize the parameters of SPI struct with the default values
|
||||
\param[in] spi_struct: SPI parameter stuct
|
||||
\param[in] spi_struct: SPI parameter struct
|
||||
\param[out] none
|
||||
\retval none
|
||||
*/
|
||||
|
||||
@@ -407,7 +407,7 @@ void timer_dma_enable(uint32_t timer_periph, uint16_t dma)
|
||||
/*!
|
||||
\brief disable the TIMER DMA
|
||||
\param[in] timer_periph: TIMERxTIMERx(x=0..6)
|
||||
\param[in] dma: specify which DMA to disbale
|
||||
\param[in] dma: specify which DMA to disable
|
||||
one or more parameters can be selected which are shown as below:
|
||||
\arg TIMER_DMA_UPD: update DMA enable, TIMERx(x=0..6)
|
||||
\arg TIMER_DMA_CH0D: channel 0 DMA enable, TIMERx(x=0..4)
|
||||
@@ -1844,7 +1844,7 @@ void timer_interrupt_enable(uint32_t timer_periph, uint32_t interrupt)
|
||||
/*!
|
||||
\brief disable the TIMER interrupt
|
||||
\param[in] timer_periph: TIMERx(x=0..6)
|
||||
\param[in] interrupt: specify which interrupt to disbale
|
||||
\param[in] interrupt: specify which interrupt to disable
|
||||
one or more parameters can be selected which are shown as below:
|
||||
\arg TIMER_INT_UP: update interrupt enable, TIMERx(x=0..6)
|
||||
\arg TIMER_INT_CH0: channel 0 interrupt enable, TIMERx(x=0..4)
|
||||
|
||||
@@ -300,7 +300,7 @@ extern UINT32 TaskUsedCountGet(VOID);
|
||||
#define HWI_NUM_TEST 31 // csky_v2 only support one software interrupt number
|
||||
#define LOS_KERNEL_MULTI_HWI_TEST 0 // csky_v2 not support multiple hwi number test case
|
||||
#elif __XTENSA_LX6__
|
||||
#define HWI_NUM_TEST 7 // xtensa_lx6 only suppport one software interrupt number
|
||||
#define HWI_NUM_TEST 7 // xtensa_lx6 only support one software interrupt number
|
||||
#define LOS_KERNEL_MULTI_HWI_TEST 0 // xtensa_lx6 not support multiple hwi number test case
|
||||
#else
|
||||
#define HWI_NUM_TEST HWI_NUM_INT7
|
||||
|
||||
@@ -56,7 +56,7 @@ static VOID TaskF01(VOID)
|
||||
ICUNIT_GOTO_STRING_EQUAL(g_taskInfo.acName, "Tsk049A", g_taskInfo.acName, EXIT1);
|
||||
ICUNIT_GOTO_EQUAL(g_taskInfo.uwTaskID, g_testTaskID01, g_taskInfo.uwTaskID, EXIT1);
|
||||
|
||||
// 2, Assert that current task`s priority is equal to the priority was setted.
|
||||
// 2, Assert that current task`s priority is equal to the priority was set.
|
||||
ICUNIT_GOTO_EQUAL(g_taskInfo.usTaskPrio, TASK_PRIO_TEST - 2, g_taskInfo.usTaskPrio, EXIT1);
|
||||
ICUNIT_GOTO_EQUAL(OS_TASK_STATUS_RUNNING & g_taskInfo.usTaskStatus, OS_TASK_STATUS_RUNNING,
|
||||
OS_TASK_STATUS_RUNNING & g_taskInfo.usTaskStatus, EXIT1);
|
||||
|
||||
@@ -853,13 +853,13 @@ LITE_TEST_CASE(PthreadFuncTestSuite, TestPthread013, Function | MediumTest | Lev
|
||||
|
||||
ret = pthread_condattr_getclock(&condattr, &clk);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(clk, 0, clk);
|
||||
ICUNIT_ASSERT_EQUAL(clk, CLOCK_REALTIME, clk);
|
||||
|
||||
ret = pthread_condattr_setclock(&condattr, 0);
|
||||
ret = pthread_condattr_setclock(&condattr, CLOCK_REALTIME);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
ret = pthread_condattr_getclock(&condattr, &clk);
|
||||
ICUNIT_ASSERT_EQUAL(ret, 0, ret);
|
||||
ICUNIT_ASSERT_EQUAL(clk, 0, clk);
|
||||
ICUNIT_ASSERT_EQUAL(clk, CLOCK_REALTIME, clk);
|
||||
|
||||
struct timespec ts = {0};
|
||||
ret = clock_getres(CLOCK_MONOTONIC, &ts);
|
||||
|
||||
@@ -93,7 +93,7 @@ static BOOL MqueueFuncTestSuiteTearDown(void)
|
||||
|
||||
/**
|
||||
* @tc.number : SUB_KERNEL_PTHREAD_OPERATION_001
|
||||
* @tc.name : event operation for creat
|
||||
* @tc.name : event operation for create
|
||||
* @tc.desc : [C- SOFTWARE -0200]
|
||||
*/
|
||||
LITE_TEST_CASE(MqueueFuncTestSuite, testMqueue001, Function | MediumTest | Level1)
|
||||
|
||||
@@ -154,7 +154,7 @@ LITE_TEST_CASE(PosixSemaphoreFuncTestSuite, testIpcSem_Timedwait002, Function |
|
||||
LOG("\n timeDiff %d", timeDiff);
|
||||
TEST_ASSERT_LESS_THAN_INT(20, timeDiff);
|
||||
|
||||
// try get semphore again
|
||||
// try get semaphore again
|
||||
ts = GetDelayedTime(100);
|
||||
LOG("\n ts %d, %d", ts.tv_sec, ts.tv_nsec);
|
||||
ret = sem_timedwait((sem_t *)&sem, &ts);
|
||||
|
||||
@@ -96,12 +96,12 @@ static int KeepRun(int msec)
|
||||
clock_gettime(CLOCK_MONOTONIC, &time1);
|
||||
LOG("KeepRun start : tv_sec=%ld, tv_nsec=%ld\n", time1.tv_sec, time1.tv_nsec);
|
||||
int loop = 0;
|
||||
int runned = 0;
|
||||
while (runned < msec) {
|
||||
int ran = 0;
|
||||
while (ran < msec) {
|
||||
++loop;
|
||||
clock_gettime(CLOCK_MONOTONIC, &time2);
|
||||
runned = (time2.tv_sec - time1.tv_sec) * MILLISECONDS_PER_SECOND;
|
||||
runned += (time2.tv_nsec - time1.tv_nsec) / NANOSECONDS_PER_MILLISECOND;
|
||||
ran = (time2.tv_sec - time1.tv_sec) * MILLISECONDS_PER_SECOND;
|
||||
ran += (time2.tv_nsec - time1.tv_nsec) / NANOSECONDS_PER_MILLISECOND;
|
||||
}
|
||||
|
||||
LOG("KeepRun end : tv_sec=%ld, tv_nsec=%ld\n", time2.tv_sec, time2.tv_nsec);
|
||||
|
||||
Reference in New Issue
Block a user