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