1/* 2 * Copyright (c) 2020 Huawei Device 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 _SYSTEM_CONFIG_H 17#define _SYSTEM_CONFIG_H 18 19#ifdef __cplusplus 20#if __cplusplus 21extern "C" { 22#endif /* __cplusplus */ 23#endif /* __cplusplus */ 24 25/* ============================================================================= 26 LiteOS kernel version configuration 27============================================================================= */ 28/** 29 * @ingroup los_config 30 * Version number 31 */ 32#define LITEOS_VER 33 34/** system source configuration**/ 35/** 36 * @ingroup los_config 37 * system clock 38 */ 39#ifdef HI_BOARD_ASIC 40#define OS_SYS_CLOCK_CONFIG 160000000 41#else 42#define OS_SYS_CLOCK_CONFIG 53000000 43#endif 44 45/** system source configuration**/ 46/** 47 * @ingroup los_config 48 * Number of Ticks in one second 49 */ 50#define LOSCFG_BASE_CORE_TICK_PER_SECOND_CONFIG 100 51 52/** system source configuration**/ 53/** 54 * @ingroup los_config 55 * Maximum supported number of tasks except the idle task rather than the number of usable tasks 56 */ 57#define LOSCFG_BASE_CORE_TSK_LIMIT_CONFIG 32 58 59/** 60 * @ingroup los_config 61 * Maximum supported number of semaphores 62 */ 63#define LOSCFG_BASE_IPC_SEM_LIMIT_CONFIG 32 64/** 65 * @ingroup los_config 66 * Maximum supported number of mutexes 67 */ 68#define LOSCFG_BASE_IPC_MUX_LIMIT_CONFIG 38 69 70/** 71 * @ingroup los_config 72 * Maximum supported number of queues rather than the number of usable queues 73 */ 74#define LOSCFG_BASE_IPC_QUEUE_LIMIT_CONFIG 32 75/** 76 * @ingroup los_config 77 * Maximum supported number of software timers rather than the number of usable software timers 78 */ 79#define LOSCFG_BASE_CORE_SWTMR_LIMIT_CONFIG 32 80 81/** 82 * @ingroup los_config 83 * Default task stack size 84 */ 85#define LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE_CONFIG (0x1000UL) 86/** 87 * @ingroup los_config 88 * Idle task stack size. 89 */ 90#define LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE_CONFIG (0x400UL) 91/** 92 * @ingroup los_config 93 * Idle task stack size. 94 */ 95#define LOSCFG_BASE_CORE_TSK_SWTMR_STACK_SIZE_CONFIG (0x800UL) 96 97/** 98 * @ingroup los_config 99 * Minimum stack size. 100 */ 101#define LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE_CONFIG (0x180UL) 102/** 103 * @ingroup los_config 104 * Stack point align size. 105 */ 106#define LOSCFG_STACK_POINT_ALIGN_SIZE 16 107/** 108 * @ingroup los_config 109 * Longest execution time of tasks with the same priorities 110 */ 111#define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT_CONFIG 2 112/** 113 * @ingroup los_cpup 114 * Number of track items 115 */ 116#define LOSCFG_BASE_MISC_TRACK_COUNT_CONFIG 10 117 118#define LOSCFG_NMI_SERVICE 0 119 120#ifdef LOSCFG_DEBUG_KASAN 121#define LOSCFG_KASAN_TASK_STACK_LIMIT_NUM 3 122#endif 123 124#define LOSCFG_MEM_POOL_SIZE 0x3C00 125 126#ifdef __cplusplus 127#if __cplusplus 128} 129#endif /* __cplusplus */ 130#endif /* __cplusplus */ 131 132#endif /* _SYSTEM_CONFIG_H */ 133