• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**@defgroup los_config System configuration items
17  * @ingroup kernel
18  */
19 
20 #ifndef _TARGET_CONFIG_H
21 #define _TARGET_CONFIG_H
22 
23 #include "stdint.h"
24 #include "stdbool.h"
25 #include "soc.h"
26 #include "los_compiler.h"
27 
28 #ifdef __cplusplus
29 #if __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
32 #endif /* __cplusplus */
33 
34 /*=============================================================================
35                                         System clock module configuration
36 =============================================================================*/
37 #define OS_SYS_CLOCK                                        10000000UL
38 #define LOSCFG_BASE_CORE_TICK_PER_SECOND                    (100UL)
39 #define LOSCFG_BASE_CORE_TICK_HW_TIME                       0
40 #define LOSCFG_BASE_CORE_TICK_WTIMER                        1
41 #define LOSCFG_BASE_CORE_TICK_RESPONSE_MAX                  ((UINT64)-1)
42 
43 /*=============================================================================
44                                        Task module configuration
45 =============================================================================*/
46 #define LOSCFG_BASE_CORE_TSK_LIMIT                          24
47 #define LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE                (0x500U)
48 #define LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE             (0x1000U)
49 #define LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE                 (0x500U)
50 #define LOSCFG_BASE_CORE_TIMESLICE                          1
51 #define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT                  20000
52 #define LOSCFG_BASE_CORE_TSK_MONITOR                        1
53 #define LOSCFG_BASE_CORE_CPUP                               1
54 
55 /*=============================================================================
56                                        Semaphore module configuration
57 =============================================================================*/
58 #define LOSCFG_BASE_IPC_SEM                                 1
59 #define LOSCFG_BASE_IPC_SEM_LIMIT                           48
60 /*=============================================================================
61                                        Mutex module configuration
62 =============================================================================*/
63 #define LOSCFG_BASE_IPC_MUX                                 1
64 #define LOSCFG_BASE_IPC_MUX_LIMIT                           24
65 /*=============================================================================
66                                        Queue module configuration
67 =============================================================================*/
68 #define LOSCFG_BASE_IPC_QUEUE                               1
69 #define LOSCFG_BASE_IPC_QUEUE_LIMIT                         24
70 /*=============================================================================
71                                        Software timer module configuration
72 =============================================================================*/
73 #define LOSCFG_BASE_CORE_SWTMR                              1
74 #define LOSCFG_BASE_CORE_SWTMR_ALIGN                        1
75 #define LOSCFG_BASE_CORE_SWTMR_LIMIT                        48
76 /*=============================================================================
77                                        Memory module configuration
78 =============================================================================*/
79 extern UINTPTR __heap_start;
80 extern UINTPTR __heap_size;
81 #define LOSCFG_SYS_EXTERNAL_HEAP                            1
82 #define LOSCFG_SYS_HEAP_ADDR                                (VOID *)&__heap_start
83 #define LOSCFG_SYS_HEAP_SIZE                                (UINTPTR)&__heap_size
84 #define LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK                0
85 #define LOSCFG_BASE_MEM_NODE_SIZE_CHECK                     0
86 #define LOSCFG_MEM_MUL_POOL                                 1
87 #define OS_SYS_MEM_NUM                                      20
88 #define LOSCFG_KERNEL_MEM_SLAB                              0
89 #define LOSCFG_MEMORY_BESTFIT                               1
90 /*=============================================================================
91                                         Exception module configuration
92 =============================================================================*/
93 #define LOSCFG_PLATFORM_EXC                                 0
94 
95 #define LOSCFG_PLATFORM_HWI_WITH_ARG                        1
96 
97 #define LOSCFG_BACKTRACE_TYPE                               2
98 
99 #define LOSCFG_KERNEL_PRINTF                                1
100 
101 #define LOSCFG_KERNEL_PM                                    1
102 
103 #define LOS_KERNEL_TEST_NOT_SMOKE                           0
104 #define LOS_KERNEL_HWI_TEST                                 0
105 /*=============================================================================
106                                        shell module configuration
107 =============================================================================*/
108 #define LOSCFG_USE_SHELL                                    1
109 #define LOSCFG_SHELL_PRIO                                   3
110 
111 extern UINT32 QemuCLZ(UINT32);
112 #undef CLZ
113 #define CLZ(n) QemuCLZ(n)
114 #ifdef __cplusplus
115 #if __cplusplus
116 }
117 #endif /* __cplusplus */
118 #endif /* __cplusplus */
119 
120 
121 #endif /* _TARGET_CONFIG_H */
122