los_config.h文件参考

浏览该文件的源代码。


宏定义

#define  OS_SYS_CLOCK   (100000000UL)
  System clock (unit: HZ)
#define  OS_TIME_TIMER_CLOCK   OS_SYS_CLOCK
  timer1 clock (unit: HZ)
#define  LOSCFG_BASE_CORE_TICK_PER_SECOND   (1000UL)
  Number of Ticks in one second
#define  LOSCFG_BASE_CORE_TICK_PERIOD_MS   (1000UL / LOSCFG_BASE_CORE_TICK_PER_SECOND)
  How much time one tick spent (unit:ms)
#define  LOSCFG_BASE_CORE_TICK_HW_TIME1   YES
  External configuration item for timer tailoring
#define  LOSCFG_BASE_CORE_TICK_HW_TIME   NO
#define  LOSCFG_KERNEL_TICKLESS   NO
  Configuration liteos kernel tickless
#define  LOSCFG_BASE_TIMER_INT_NUM   (15)
  External configuration item for timer interrupt number
#define  LOSCFG_PLATFORM_HWI   YES
  Configuration item for hardware interrupt tailoring
#define  LOSCFG_PLATFORM_HWI_LIMIT   32
  Maximum number of used hardware interrupts, including Tick timer interrupts.
#define  LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE   (ALIGN(0x80, 4))
  Minimum stack size.
#define  LOSCFG_BASE_CORE_TSK_DEFAULT_PRIO   10
  Default task priority
#define  LOSCFG_BASE_CORE_TSK_LIMIT   5
  Maximum supported number of tasks except the idle task rather than the number of usable tasks
#define  LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE   (0x180UL)
  Size of the idle task stack
#define  LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE   (0x400UL)
  Default task stack size
#define  LOSCFG_BASE_CORE_TIMESLICE   YES
  Configuration item for task Robin tailoring
#define  LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT   10
  Longest execution time of tasks with the same priorities
#define  LOSCFG_BASE_CORE_TSK_MONITOR   NO
  Configuration item for task (stack) monitoring module tailoring
#define  LOSCFG_BASE_CORE_EXC_TSK_SWITCH   NO
  Configuration item for task perf task filter hook
#define  LOS_TASK_PRIORITY_HIGHEST   0
  Define a usable task priority.Highest task priority.
#define  LOS_TASK_PRIORITY_LOWEST   31
  Define a usable task priority.Lowest task priority.
#define  LOSCFG_BASE_CORE_TASKSTACK_INDEPENDENT   NO
  Configuration item for task stack independent
#define  LOSCFG_STACK_POINT_ALIGN_SIZE   8
  SP align size
#define  LOSCFG_BASE_IPC_SEM   YES
  Configuration item for semaphore module tailoring
#define  LOSCFG_BASE_IPC_SEM_LIMIT   6
  Maximum supported number of semaphores
#define  LOSCFG_BASE_IPC_MUX   YES
  Configuration item for mutex module tailoring
#define  LOSCFG_BASE_IPC_MUX_LIMIT   6
  Maximum supported number of mutexes
#define  LOSCFG_BASE_IPC_QUEUE   YES
  Configuration item for queue module tailoring
#define  LOSCFG_BASE_IPC_QUEUE_LIMIT   6
  Maximum supported number of queues rather than the number of usable queues
#define  LOSCFG_BASE_CORE_SWTMR   YES
  Configuration item for software timer module tailoring
#define  LOSCFG_BASE_CORE_SWTMR_LIMIT   5
  Maximum supported number of software timers rather than the number of usable software timers
#define  LOSCFG_BASE_CORE_TSK_SWTMR_STACK_SIZE   LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE
  Software timer task stack size
#define  LOSCFG_BASE_CORE_SWTMR_TASK   YES
  Configurate item for handling software timer interrupt in task tailoring
#define  LOSCFG_BASE_CORE_SWTMR_ALIGN   NO
  Configurate item for software timer align tailoring
#define  OS_SWTMR_MAX_TIMERID   ((65535 / LOSCFG_BASE_CORE_SWTMR_LIMIT) * LOSCFG_BASE_CORE_SWTMR_LIMIT)
  Max number of software timers ID
#define  OS_SWTMR_HANDLE_QUEUE_SIZE   (LOSCFG_BASE_CORE_SWTMR_LIMIT + 0)
  Maximum size of a software timer queue
#define  LOS_COMMON_DIVISOR   10
  Minimum divisor of software timer multiple alignment
#define  OS_SYS_MEM_ADDR   (&m_aucSysMem0[0])
  Starting address of the memory
#define  OS_TASK_STACK_ADDR   OS_SYS_MEM_ADDR
  Starting address of the task stack
#define  OS_SYS_MEM_SIZE   (0x10000UL)
  Memory size
#define  LOSCFG_MEMORY_BESTFIT   YES
#define  LOSCFG_MEM_MUL_POOL   NO
  Configuration module tailoring of more mempry pool checking
#define  LOSCFG_KERNEL_MEM_SLAB   YES
  Configuration module tailoring of slab memory
#define  LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK   NO
  Configuration module tailoring of mem node integrity checking
#define  LOSCFG_BASE_MEM_NODE_SIZE_CHECK   YES
  Configuration module tailoring of mem node size checking
#define  OS_SYS_MEM_NUM   20
  Number of memory checking blocks
#define  LOSCFG_HEAP_MEMORY_PEAK_STATISTICS   YES
  Configuration heap memory peak statistics
#define  OS_SYS_NOCACHEMEM_SIZE   0x0UL
  Size of unaligned memory
#define  LOSCFG_PLATFORM_EXC   NO
  Starting address of the unaligned memory
#define  LOSCFG_EXC_HRADWARE_STACK_PROTECTION   NO
  Configuration of hardware stack protection
#define  LOSCFG_BASE_CORE_MPU   NO
  Configuration item for MPU
#define  LOSCFG_MPU_MAX_SUPPORT   8
  MPU support number : MPU maximum number of region support(According to the cotex-m4 authority Guide)
#define  LOSCFG_MPU_MIN_ADDRESS   0x0UL
  MPU support address range : from LOSCFG_MPU_MIN_ADDRESS to LOSCFG_MPU_MAX_ADDRESS
#define  LOSCFG_MPU_MAX_ADDRESS   0xFFFFFFFFUL
#define  LOSCFG_KERNEL_RUNSTOP   NO
  Configuration item for runstop module tailoring
#define  OS_INCLUDE_PERF   NO
  Configuration item for performance moniter unit
#define  LOSCFG_BASE_CORE_CPUP   NO
  Configuration item for CPU usage tailoring
#define  LOSCFG_COMPAT_CMSIS_FW   NO
  Configuration item for the monitoring of task communication
#define  OS_INCLUDE_SHELL   NO
  Configuration item for shell module tailoring
#define  LOSCFG_TEST   NO
  Configuration test case to open
#define  LITEOS_VER   "Huawei LiteOS Kernel V100R001c00B021"
  Version number
#define  CMSIS_OS_VER   1
  Configuration CMSIS_OS_VER
#define  LOSCFG_KERNEL_TRACE   NO
  Configuration liteos trace

函数

UINT32  osTaskInit (VOID)
  : Task init function.
VOID  osHwiInit (void)
  : hardware interrupt init function.
UINT32  osSemInit (void)
  : Semaphore init function.
UINT32  osMuxInit (void)
  : Mutex init function.
UINT32  osQueueInit (void)
  : Queue init function.
UINT32  osSwTmrInit (void)
  : Software Timers init function.
VOID  LOS_StartToRun (VOID)
  : Task start running function.
UINT32  los_TestInit (VOID)
  : Test Task init function.
VOID  osStart (void)
  : User application Task init function.
VOID  osHwInit (VOID)
  : Hardware init function.
UINT32  osTickStart (VOID)
  Configure Tick Interrupt Start.
VOID  osTimesliceInit (VOID)
  Scheduling initialization.
LITE_OS_SEC_TEXT_INIT UINT32  osMemSystemInit (VOID)
  : System memory init function.
VOID  osTaskMonInit (VOID)
  : Task Monitor init function.
UINT32  osCpupInit (VOID)
  : CPUP init function.
LITE_OS_SEC_TEXT_INIT UINT32  LOS_Start (void)
LITE_OS_SEC_TEXT_INIT int  main (void)

变量

UINT8 m_aucSysMem0
UINT32  g_sys_mem_addr_end
  Ending address of the memory