• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 Hunan OpenValley Digital Industry Development 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 #ifndef _TARGET_CONFIG_H
17 #define _TARGET_CONFIG_H
18 
19 #include "los_compiler.h"
20 
21 #ifdef __cplusplus
22 #if __cplusplus
23 extern "C" {
24 #endif /* __cplusplus */
25 #endif /* __cplusplus */
26 
27 int esp_rom_printf(const char *, ...);
28 
29 #define LOSCFG_TASK_STRUCT_EXTENSION \
30     UINT32 MPUSettings[1];           \
31     UINT16 basePriority;             \
32     void *LocalStoragePointer[1];    \
33     void *LocalDelCallback[1]
34 
35 void TaskDeleteExtensionHook(VOID *);
36 void TaskCreateExtensionHook(VOID *);
37 
38 #define LOSCFG_TASK_CREATE_EXTENSION_HOOK TaskCreateExtensionHook
39 #define LOSCFG_TASK_DELETE_EXTENSION_HOOK TaskDeleteExtensionHook
40 #define LOSCFG_STACK_POINT_ALIGN_SIZE 16
41 #define OS_HWI_WITH_ARG 1
42 #define OS_TICK_INT_NUM 6
43 /*=============================================================================
44                                         System clock module configuration
45 =============================================================================*/
46 #define OS_SYS_CLOCK (100UL)                          // 160000000
47 #define LOSCFG_BASE_CORE_TICK_PER_SECOND OS_SYS_CLOCK // (100UL)
48 #define LOSCFG_BASE_CORE_TICK_HW_TIME 0
49 #define LOSCFG_BASE_CORE_TICK_WTIMER 1
50 #define LOSCFG_BASE_CORE_TICK_RESPONSE_MAX OS_SYS_CLOCK // 1600000
51 
52 /*=============================================================================
53                                         Hardware interrupt module configuration
54 =============================================================================*/
55 #define LOSCFG_PLATFORM_HWI 1
56 #define OS_TICK_INT_NUM 6
57 #define LOSCFG_PLATFORM_HWI_LIMIT 32
58 /*=============================================================================
59                                        Task module configuration
60 =============================================================================*/
61 #define LOSCFG_BASE_CORE_TSK_LIMIT 24
62 #define LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE (0x800U)
63 #define LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE (0x1000U)
64 #define LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE (256U)
65 #define LOSCFG_BASE_CORE_TIMESLICE 1
66 #define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT 20000
67 
68 /*=============================================================================
69                                        Semaphore module configuration
70 =============================================================================*/
71 #define LOSCFG_BASE_IPC_SEM 1
72 #define LOSCFG_BASE_IPC_SEM_LIMIT 48
73 
74 /*=============================================================================
75                                        Mutex module configuration
76 =============================================================================*/
77 #define LOSCFG_BASE_IPC_MUX 1
78 #define LOSCFG_BASE_IPC_MUX_LIMIT 24
79 
80 /*=============================================================================
81                                        Queue module configuration
82 =============================================================================*/
83 #define LOSCFG_BASE_IPC_QUEUE 1
84 #define LOSCFG_BASE_IPC_QUEUE_LIMIT 24
85 
86 /*=============================================================================
87                                        Software timer module configuration
88 =============================================================================*/
89 #define LOSCFG_BASE_CORE_SWTMR 1
90 #define LOSCFG_BASE_CORE_SWTMR_ALIGN 1
91 #define LOSCFG_BASE_CORE_SWTMR_LIMIT 48
92 
93 /*=============================================================================
94                                        Memory module configuration
95 =============================================================================*/
96 #define LOSCFG_SYS_EXTERNAL_HEAP 1
97 #define LOSCFG_SYS_HEAP_ADDR m_aucSysMem0
98 #define LOSCFG_SYS_HEAP_SIZE 0x14000UL
99 #define LOSCFG_MEM_MUL_POOL 1
100 #define OS_SYS_MEM_NUM 8
101 #define LOSCFG_MEM_FREE_BY_TASKID 0
102 #define LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK 1
103 #define LOSCFG_MEM_LEAKCHECK 0
104 #define LOSCFG_MEMORY_BESTFIT 1
105 #define LOSCFG_KERNEL_MEM_SLAB 0
106 /*=============================================================================
107                                         Exception module configuration
108 =============================================================================*/
109 #define LOSCFG_PLATFORM_EXC 0
110 
111 /* =============================================================================
112                                        printf module configuration
113 ============================================================================= */
114 #define LOSCFG_KERNEL_PRINTF 1
115 #define LOSCFG_BACKTRACE_TYPE 0
116 #define LOSCFG_BACKTRACE_DEPTH 4
117 #define LOSCFG_DEBUG_HOOK 0
118 #define LOS_KERNEL_TEST_NOT_SMOKE 0
119 
120 /*=============================================================================
121                                        shell module configuration
122 =============================================================================*/
123 #define LOSCFG_USE_SHELL 1
124 #define PRINT_LEVEL LOG_DEBUG_LEVEL
125 
126 #ifdef __cplusplus
127 #if __cplusplus
128 }
129 #endif /* __cplusplus */
130 #endif /* __cplusplus */
131 
132 #endif /* _TARGET_CONFIG_H */
133