• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 GOODIX.
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 "gr55xx.h"
24 #include "gr55xx_sys.h"
25 
26 /*=============================================================================
27                                         System clock module configuration
28 =============================================================================*/
29 #define OS_SYS_CLOCK                                        64000000
30 #define LOSCFG_BASE_CORE_TICK_PER_SECOND                    (1000UL)
31 #define LOSCFG_BASE_CORE_TICK_HW_TIME                       0
32 #define LOSCFG_BASE_CORE_TICK_WTIMER                        0
33 #define LOSCFG_BASE_CORE_TICK_RESPONSE_MAX                  0xFFFFFFUL
34 /*=============================================================================
35                                         Hardware interrupt module configuration
36 =============================================================================*/
37 #define LOSCFG_PLATFORM_HWI                                 1
38 #define LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT                 1
39 #define LOSCFG_PLATFORM_HWI_LIMIT                           34
40 /*=============================================================================
41                                        Task module configuration
42 =============================================================================*/
43 #define LOSCFG_BASE_CORE_TSK_LIMIT                          24
44 #define LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE                (0x500U)
45 #define LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE             (0x2D0U)
46 #define LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE                 (0x130U)
47 #define LOSCFG_BASE_CORE_TIMESLICE                          1
48 #define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT                  10
49 
50 #define LOSCFG_BASE_CORE_TSK_MONITOR                        1
51 #define LOSCFG_BASE_CORE_CPUP                               1
52 #define LOSCFG_BASE_CORE_EXC_TSK_SWITCH                     1
53 
54 /*=============================================================================
55                                        Semaphore module configuration
56 =============================================================================*/
57 #define LOSCFG_BASE_IPC_SEM                                 1
58 #define LOSCFG_BASE_IPC_SEM_LIMIT                           48
59 /*=============================================================================
60                                        Mutex module configuration
61 =============================================================================*/
62 #define LOSCFG_BASE_IPC_MUX                                 1
63 #define LOSCFG_BASE_IPC_MUX_LIMIT                           80
64 /*=============================================================================
65                                        Queue module configuration
66 =============================================================================*/
67 #define LOSCFG_BASE_IPC_QUEUE                               1
68 #define LOSCFG_BASE_IPC_QUEUE_LIMIT                         48
69 /*=============================================================================
70                                        Software timer module configuration
71 =============================================================================*/
72 #define LOSCFG_BASE_CORE_SWTMR                              1
73 #define LOSCFG_BASE_CORE_SWTMR_ALIGN                        1
74 #define LOSCFG_BASE_CORE_SWTMR_LIMIT                        48
75 /*=============================================================================
76                                        Memory module configuration
77 =============================================================================*/
78 #define LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK                1
79 #define LOSCFG_BASE_MEM_NODE_SIZE_CHECK                     1
80 #define LOSCFG_MEM_MUL_POOL                                 1
81 #define OS_SYS_MEM_NUM                                      20
82 #define LOSCFG_KERNEL_MEM_SLAB                              0
83 
84 
85 extern unsigned char __los_heap_addr_start__[];
86 extern unsigned char __los_heap_addr_end__[];
87 #define LOSCFG_SYS_EXTERNAL_HEAP                            1
88 #define LOSCFG_SYS_HEAP_ADDR                                ((void *)__los_heap_addr_start__)
89 #define LOSCFG_SYS_HEAP_SIZE    (((unsigned long)__los_heap_addr_end__) - \
90                                  ((unsigned long)__los_heap_addr_start__) + 1)
91 #define OS_TASK_STACK_ADDR                                  (&m_aucSysMem0[0])
92 
93 /*=============================================================================
94                                         Exception module configuration
95 =============================================================================*/
96 #define LOSCFG_PLATFORM_EXC                                 1
97 #define LOSCFG_KERNEL_PRINTF                                1
98 
99 
100 #endif /* _TARGET_CONFIG_H */
101