70#define OS_SYS_CLOCK (get_bus_clk())
76#ifndef OS_TIME_TIMER_CLOCK
77#define OS_TIME_TIMER_CLOCK OS_SYS_CLOCK
84#ifndef OS_SYS_FUNC_ADDR_START
85#define OS_SYS_FUNC_ADDR_START ((UINTPTR)&__int_stack_start)
87#ifndef OS_SYS_FUNC_ADDR_END
88#define OS_SYS_FUNC_ADDR_END (KERNEL_VMM_BASE + SYS_MEM_SIZE_DEFAULT)
95#ifndef LOSCFG_BASE_CORE_TICK_PER_SECOND
96#define LOSCFG_BASE_CORE_TICK_PER_SECOND 1000
103#ifndef LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI
104#define LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI 1000UL
107#if (LOSCFG_BASE_CORE_TICK_PER_SECOND > LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI)
108 #error "LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI must be greater than LOSCFG_BASE_CORE_TICK_PER_SECOND"
111#if (LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI > 1000UL)
112 #error "LOSCFG_BASE_CORE_TICK_PER_SECOND_MINI must be less than or equal to 1000"
119#ifndef LOSCFG_BASE_CORE_ADJ_PER_SECOND
120#define LOSCFG_BASE_CORE_ADJ_PER_SECOND 500
127#define SCHED_CLOCK_INTETRVAL_TICKS LOSCFG_BASE_CORE_TICK_PER_SECOND
133#if defined(LOSCFG_BASE_CORE_TICK_HW_TIME) && (LOSCFG_BASE_CORE_TICK_HW_TIME == 0)
134#undef LOSCFG_BASE_CORE_TICK_HW_TIME
142#ifndef LOSCFG_PLATFORM_HWI
143#define LOSCFG_PLATFORM_HWI
150#ifndef LOSCFG_PLATFORM_HWI_LIMIT
151#define LOSCFG_PLATFORM_HWI_LIMIT 96
160#ifdef LOSCFG_ARCH_INTERRUPT_PREEMPTION
161#ifndef MAX_BINARY_POINT_VALUE
162#define MAX_BINARY_POINT_VALUE 4
174#ifndef LOS_TASK_MIN_STACK_SIZE
176#define LOS_TASK_MIN_STACK_SIZE (ALIGN(0x800, 8))
178#define LOS_TASK_MIN_STACK_SIZE (ALIGN(0x800, 4))
186#ifndef LOSCFG_BASE_CORE_TSK_DEFAULT_PRIO
187#define LOSCFG_BASE_CORE_TSK_DEFAULT_PRIO 10
194#ifndef LOSCFG_BASE_CORE_TSK_LIMIT
195#define LOSCFG_BASE_CORE_TSK_LIMIT 128
202#ifndef LOSCFG_BASE_CORE_PROCESS_LIMIT
203#define LOSCFG_BASE_CORE_PROCESS_LIMIT 64
206#if (LOSCFG_BASE_CORE_TSK_LIMIT < LOSCFG_BASE_CORE_PROCESS_LIMIT)
207#error "The number of tasks must be greater than or equal to the number of processes!"
214#ifndef LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE
215#define LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE SIZE(0x800)
222#ifndef LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE
223#define LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE SIZE(0x4000)
230#ifndef LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT
231#define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT 20000
238#ifndef LOSCFG_BASE_CORE_TSK_MONITOR
239#define LOSCFG_BASE_CORE_TSK_MONITOR
247#ifndef LOSCFG_BASE_IPC_SEM
248#define LOSCFG_BASE_IPC_SEM
255#ifndef LOSCFG_BASE_IPC_SEM_LIMIT
256#define LOSCFG_BASE_IPC_SEM_LIMIT 1024
263#ifndef OS_SEM_COUNT_MAX
264#define OS_SEM_COUNT_MAX 0xFFFE
271#ifndef LOSCFG_BASE_IPC_MUX
272#define LOSCFG_BASE_IPC_MUX
280#ifndef LOSCFG_BASE_IPC_RWLOCK
281#define LOSCFG_BASE_IPC_RWLOCK
289#ifndef LOSCFG_BASE_IPC_QUEUE
290#define LOSCFG_BASE_IPC_QUEUE
297#ifndef LOSCFG_BASE_IPC_QUEUE_LIMIT
298#define LOSCFG_BASE_IPC_QUEUE_LIMIT 1024
301#ifdef LOSCFG_BASE_IPC_QUEUE
307#ifndef LOSCFG_BASE_CORE_SWTMR_ENABLE
308#define LOSCFG_BASE_CORE_SWTMR_ENABLE
311#ifdef LOSCFG_BASE_CORE_SWTMR_ENABLE
312#define LOSCFG_BASE_CORE_SWTMR 1
314#define LOSCFG_BASE_CORE_SWTMR 0
321#ifndef LOSCFG_BASE_CORE_SWTMR_LIMIT
322#define LOSCFG_BASE_CORE_SWTMR_LIMIT 1024
330#ifndef OS_SWTMR_MAX_TIMERID
331#define OS_SWTMR_MAX_TIMERID ((0xFFFF / LOSCFG_BASE_CORE_SWTMR_LIMIT) * LOSCFG_BASE_CORE_SWTMR_LIMIT)
337#ifndef OS_SWTMR_HANDLE_QUEUE_SIZE
338#define OS_SWTMR_HANDLE_QUEUE_SIZE LOSCFG_BASE_CORE_SWTMR_LIMIT
348#ifndef OS_SYS_MEM_ADDR
349#define OS_SYS_MEM_ADDR (&m_aucSysMem1[0])
356#ifndef OS_SYS_MEM_SIZE
357#define OS_SYS_MEM_SIZE \
358 ((OS_SYS_FUNC_ADDR_END) - (((UINTPTR)&__bss_end + (64 - 1)) & ~(64 - 1)))
363#ifdef LOSCFG_KERNEL_SMP
364#define LOSCFG_KERNEL_CORE_NUM LOSCFG_KERNEL_SMP_CORE_NUM
366#define LOSCFG_KERNEL_CORE_NUM 1
369#define LOSCFG_KERNEL_CPU_MASK ((1 << LOSCFG_KERNEL_CORE_NUM) - 1)
376#define KERNEL_NAME "Huawei LiteOS"
377#define KERNEL_SEP " "
378#define _V(v) _T(KERNEL_NAME)_T(KERNEL_SEP)_T(v)
384#define KERNEL_MAJOR 2
385#define KERNEL_MINOR 0
386#define KERNEL_PATCH 0
387#define KERNEL_ITRE 37
389#define VERSION_NUM(a, b, c, d) (((a) << 24) | ((b) << 16) | (c) << 8 | (d))
390#define KERNEL_OPEN_VERSION_NUM VERSION_NUM(KERNEL_MAJOR, KERNEL_MINOR, KERNEL_PATCH, KERNEL_ITRE)
393#ifdef LOSCFG_SAVE_EXCINFO
398#define EXCINFO_RECORD_BUF_SIZE (16 * 1024)
410#define EXCINFO_RECORD_ADDR (0xffffffff)
CHAR __int_stack_start
运行系统函数栈的开始地址 值来自于 liteos.ld中的 __int_stack_start = .;
VOID(* log_read_write_fn)(UINT32 startAddr, UINT32 space, UINT32 rwFlag, CHAR *buf)
define the type of functions for reading or writing exception information.
VOID LOS_ExcInfoRegHook(UINT32 startAddr, UINT32 space, CHAR *buf, log_read_write_fn hook)
Register recording exception information function.
SystemRebootFunc OsGetRebootHook(VOID)
获取系统重启钩子函数
CHAR __ram_data_end
RAM结束地址
VOID OsSetRebootHook(SystemRebootFunc func)
设置系统重启钩子函数
VOID(* SystemRebootFunc)(VOID)
CHAR __bss_start
bss开始地址 attribute((section(".__bss_start")));
CHAR __ram_data_start
RAM开始地址 可读可写
UINT32 __heap_start
堆区开始地址
CHAR __bss_end
bss结束地址 attribute((section(".__bss_end")));
CHAR __rodata_start
ROM开始地址 只读
UINT32 OsMain(VOID)
由汇编调用,鸿蒙C语言层级的入口点