1d6aed566Sopenharmony_ci/*
2d6aed566Sopenharmony_ci * Copyright (c) 2022-2022 Huawei Device Co., Ltd. All rights reserved.
3d6aed566Sopenharmony_ci *
4d6aed566Sopenharmony_ci * Redistribution and use in source and binary forms, with or without modification,
5d6aed566Sopenharmony_ci * are permitted provided that the following conditions are met:
6d6aed566Sopenharmony_ci *
7d6aed566Sopenharmony_ci * 1. Redistributions of source code must retain the above copyright notice, this list of
8d6aed566Sopenharmony_ci *    conditions and the following disclaimer.
9d6aed566Sopenharmony_ci *
10d6aed566Sopenharmony_ci * 2. Redistributions in binary form must reproduce the above copyright notice, this list
11d6aed566Sopenharmony_ci *    of conditions and the following disclaimer in the documentation and/or other materials
12d6aed566Sopenharmony_ci *    provided with the distribution.
13d6aed566Sopenharmony_ci *
14d6aed566Sopenharmony_ci * 3. Neither the name of the copyright holder nor the names of its contributors may be used
15d6aed566Sopenharmony_ci *    to endorse or promote products derived from this software without specific prior written
16d6aed566Sopenharmony_ci *    permission.
17d6aed566Sopenharmony_ci *
18d6aed566Sopenharmony_ci * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19d6aed566Sopenharmony_ci * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
20d6aed566Sopenharmony_ci * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21d6aed566Sopenharmony_ci * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
22d6aed566Sopenharmony_ci * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23d6aed566Sopenharmony_ci * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24d6aed566Sopenharmony_ci * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25d6aed566Sopenharmony_ci * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26d6aed566Sopenharmony_ci * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27d6aed566Sopenharmony_ci * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28d6aed566Sopenharmony_ci * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29d6aed566Sopenharmony_ci */
30d6aed566Sopenharmony_ci
31d6aed566Sopenharmony_ci/**@defgroup los_config System configuration items
32d6aed566Sopenharmony_ci * @ingroup kernel
33d6aed566Sopenharmony_ci */
34d6aed566Sopenharmony_ci
35d6aed566Sopenharmony_ci#ifndef _TARGET_CONFIG_H
36d6aed566Sopenharmony_ci#define _TARGET_CONFIG_H
37d6aed566Sopenharmony_ci
38d6aed566Sopenharmony_ci#include "soc.h"
39d6aed566Sopenharmony_ci
40d6aed566Sopenharmony_ci/*=============================================================================
41d6aed566Sopenharmony_ci                                        System clock module configuration
42d6aed566Sopenharmony_ci=============================================================================*/
43d6aed566Sopenharmony_ci#define OS_SYS_CLOCK                                        SYSCLK_FREQ
44d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TICK_PER_SECOND                    (100UL)
45d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TICK_HW_TIME                       0
46d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TICK_WTIMER                        0
47d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TICK_RESPONSE_MAX                  0xFFFFFFUL
48d6aed566Sopenharmony_ci
49d6aed566Sopenharmony_ci/*=============================================================================
50d6aed566Sopenharmony_ci                                        Hardware interrupt module configuration
51d6aed566Sopenharmony_ci=============================================================================*/
52d6aed566Sopenharmony_ci#define LOSCFG_PLATFORM_HWI                                 1
53d6aed566Sopenharmony_ci#define LOSCFG_PLATFORM_HWI_WITH_ARG                        0
54d6aed566Sopenharmony_ci#define LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT                 1
55d6aed566Sopenharmony_ci#define LOSCFG_PLATFORM_HWI_LIMIT                           128
56d6aed566Sopenharmony_ci/*=============================================================================
57d6aed566Sopenharmony_ci                                       Task module configuration
58d6aed566Sopenharmony_ci=============================================================================*/
59d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TSK_LIMIT                          24
60d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE                (0x500U)
61d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE             (0x1000U)
62d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE                 (0x130U)
63d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TIMESLICE                          1
64d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT                  20000
65d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_TSK_MONITOR                        1
66d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_EXC_TSK_SWITCH                     1
67d6aed566Sopenharmony_ci
68d6aed566Sopenharmony_ci/*=============================================================================
69d6aed566Sopenharmony_ci                                       Semaphore module configuration
70d6aed566Sopenharmony_ci=============================================================================*/
71d6aed566Sopenharmony_ci#define LOSCFG_BASE_IPC_SEM                                 1
72d6aed566Sopenharmony_ci#define LOSCFG_BASE_IPC_SEM_LIMIT                           48
73d6aed566Sopenharmony_ci/*=============================================================================
74d6aed566Sopenharmony_ci                                       Mutex module configuration
75d6aed566Sopenharmony_ci=============================================================================*/
76d6aed566Sopenharmony_ci#define LOSCFG_BASE_IPC_MUX                                 1
77d6aed566Sopenharmony_ci#define LOSCFG_BASE_IPC_MUX_LIMIT                           24
78d6aed566Sopenharmony_ci/*=============================================================================
79d6aed566Sopenharmony_ci                                       Queue module configuration
80d6aed566Sopenharmony_ci=============================================================================*/
81d6aed566Sopenharmony_ci#define LOSCFG_BASE_IPC_QUEUE                               1
82d6aed566Sopenharmony_ci#define LOSCFG_BASE_IPC_QUEUE_LIMIT                         24
83d6aed566Sopenharmony_ci/*=============================================================================
84d6aed566Sopenharmony_ci                                       Software timer module configuration
85d6aed566Sopenharmony_ci=============================================================================*/
86d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_SWTMR                              1
87d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_SWTMR_ALIGN                        1
88d6aed566Sopenharmony_ci#define LOSCFG_BASE_CORE_SWTMR_LIMIT                        48
89d6aed566Sopenharmony_ci/*=============================================================================
90d6aed566Sopenharmony_ci                                       Memory module configuration
91d6aed566Sopenharmony_ci=============================================================================*/
92d6aed566Sopenharmony_ciextern unsigned int __heap_start;
93d6aed566Sopenharmony_ciextern unsigned int __heap_size;
94d6aed566Sopenharmony_ci#define LOSCFG_SYS_EXTERNAL_HEAP                            1
95d6aed566Sopenharmony_ci#define LOSCFG_SYS_HEAP_ADDR                                ((void *)&__heap_start)
96d6aed566Sopenharmony_ci#define LOSCFG_SYS_HEAP_SIZE                                ((unsigned int)&__heap_size)
97d6aed566Sopenharmony_ci#define LOSCFG_MEM_MUL_POOL                                 1
98d6aed566Sopenharmony_ci#define OS_SYS_MEM_NUM                                      20
99d6aed566Sopenharmony_ci#define LOSCFG_MEM_FREE_BY_TASKID                           1
100d6aed566Sopenharmony_ci#define LOSCFG_MEMORY_BESTFIT                               1
101d6aed566Sopenharmony_ci
102d6aed566Sopenharmony_ci/* =============================================================================
103d6aed566Sopenharmony_ci                                       printf module configuration
104d6aed566Sopenharmony_ci============================================================================= */
105d6aed566Sopenharmony_ci#define LOSCFG_KERNEL_PRINTF                                1
106d6aed566Sopenharmony_ci
107d6aed566Sopenharmony_ci#define LOS_KERNEL_TEST_NOT_SMOKE                           0
108d6aed566Sopenharmony_ci
109d6aed566Sopenharmony_ci/*=============================================================================
110d6aed566Sopenharmony_ci                                       shell module configuration
111d6aed566Sopenharmony_ci=============================================================================*/
112d6aed566Sopenharmony_ci#define LOSCFG_USE_SHELL                                    1
113d6aed566Sopenharmony_ci#define LOSCFG_SHELL_PRIO                                   3
114d6aed566Sopenharmony_ci
115d6aed566Sopenharmony_ci#endif /* _TARGET_CONFIG_H */
116