• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 HPMicro
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                                        24000000UL
38 #define LOSCFG_BASE_CORE_TICK_PER_SECOND                    (1000UL)
39 #define LOSCFG_BASE_CORE_TICK_WTIMER                        1
40 #define LOSCFG_BASE_CORE_TICK_RESPONSE_MAX                  ((UINT64)-1)
41 
42 /*=============================================================================
43                                        Task module configuration
44 =============================================================================*/
45 #define LOSCFG_BASE_CORE_TSK_LIMIT                          32
46 #define LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE                (0x500U)
47 #define LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE             (0x1000U)
48 #define LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE                 (0x500U)
49 #define LOSCFG_BASE_CORE_TIMESLICE                          1
50 #define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT                  20000
51 #define LOSCFG_BASE_CORE_TSK_MONITOR                        1
52 
53 /*=============================================================================
54                                        Semaphore module configuration
55 =============================================================================*/
56 #define LOSCFG_BASE_IPC_SEM                                 1
57 #define LOSCFG_BASE_IPC_SEM_LIMIT                           48
58 /*=============================================================================
59                                        Mutex module configuration
60 =============================================================================*/
61 #define LOSCFG_BASE_IPC_MUX                                 1
62 #define LOSCFG_BASE_IPC_MUX_LIMIT                           512
63 /*=============================================================================
64                                        Queue module configuration
65 =============================================================================*/
66 #define LOSCFG_BASE_IPC_QUEUE                               1
67 #define LOSCFG_BASE_IPC_QUEUE_LIMIT                         24
68 /*=============================================================================
69                                        Software timer module configuration
70 =============================================================================*/
71 #define LOSCFG_BASE_CORE_SWTMR                              1
72 #define LOSCFG_BASE_CORE_SWTMR_ALIGN                        1
73 #define LOSCFG_BASE_CORE_SWTMR_LIMIT                        48
74 /*=============================================================================
75                                        Memory module configuration
76 =============================================================================*/
77 extern UINTPTR __heap_start;
78 extern UINTPTR __heap_size;
79 #define LOSCFG_SYS_EXTERNAL_HEAP                            1
80 #define LOSCFG_SYS_HEAP_ADDR                                (VOID *)&__heap_start
81 #define LOSCFG_SYS_HEAP_SIZE                                (UINTPTR)&__heap_size
82 #define LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK                0
83 #define LOSCFG_BASE_MEM_NODE_SIZE_CHECK                     0
84 #define LOSCFG_MEM_MUL_POOL                                 1
85 #define OS_SYS_MEM_NUM                                      20
86 #define LOSCFG_KERNEL_MEM_SLAB                              0
87 #define LOSCFG_MEMORY_BESTFIT                               1
88 /*=============================================================================
89                                         Exception module configuration
90 =============================================================================*/
91 #define LOSCFG_PLATFORM_EXC                                 0
92 
93 #define LOSCFG_PLATFORM_HWI_WITH_ARG                        1
94 
95 #define LOSCFG_BACKTRACE_TYPE                               2
96 
97 #define LOSCFG_KERNEL_PRINTF                                1
98 
99 #define LOS_KERNEL_TEST_NOT_SMOKE                           0
100 #define LOS_KERNEL_HWI_TEST                                 0
101 
102 #ifdef __cplusplus
103 #if __cplusplus
104 }
105 #endif /* __cplusplus */
106 #endif /* __cplusplus */
107 
108 
109 #endif /* _TARGET_CONFIG_H */
110