1 /* 2 * Copyright (c) 2021 Chipsea Technologies (Shenzhen) Corp., Ltd. All rights reserved. 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 "chip.h" 24 25 #ifdef __cplusplus 26 #if __cplusplus 27 extern "C" { 28 #endif /* __cplusplus */ 29 #endif /* __cplusplus */ 30 31 /*============================================================================= 32 System clock module configuration 33 =============================================================================*/ 34 #define OS_SYS_CLOCK (uint32_t)(240000000) 35 #define LOSCFG_BASE_CORE_TICK_PER_SECOND (1000UL) 36 #define LOSCFG_BASE_CORE_TICK_HW_TIME 0 37 #define LOSCFG_BASE_CORE_TICK_WTIMER 0 38 #define LOSCFG_BASE_CORE_TICK_RESPONSE_MAX SysTick_LOAD_RELOAD_Msk 39 40 /*============================================================================= 41 Hardware interrupt module configuration 42 =============================================================================*/ 43 #define LOSCFG_PLATFORM_HWI 1 44 #define LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT 0 45 #define LOSCFG_PLATFORM_HWI_LIMIT 128 46 /*============================================================================= 47 Task module configuration 48 =============================================================================*/ 49 #define LOSCFG_BASE_CORE_TSK_LIMIT 48 50 #define LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE (0x500U) 51 #define LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE (0x2D0U) 52 #define LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE (0x130U) 53 #define LOSCFG_BASE_CORE_TIMESLICE 1 54 #define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT 20000 55 /*============================================================================= 56 Semaphore module configuration 57 =============================================================================*/ 58 #define LOSCFG_BASE_IPC_SEM 1 59 #define LOSCFG_BASE_IPC_SEM_LIMIT 48 60 /*============================================================================= 61 Mutex module configuration 62 =============================================================================*/ 63 #define LOSCFG_BASE_IPC_MUX 1 64 #define LOSCFG_BASE_IPC_MUX_LIMIT CFG_OS_IPC_MUX_LIMIT 65 /*============================================================================= 66 Queue module configuration 67 =============================================================================*/ 68 #define LOSCFG_BASE_IPC_QUEUE 1 69 #define LOSCFG_BASE_IPC_QUEUE_LIMIT 48 70 /*============================================================================= 71 Software timer module configuration 72 =============================================================================*/ 73 #define LOSCFG_BASE_CORE_SWTMR 1 74 #define LOSCFG_BASE_CORE_SWTMR_ALIGN 0 75 #define LOSCFG_BASE_CORE_SWTMR_LIMIT 48 76 /*============================================================================= 77 Memory module configuration 78 =============================================================================*/ 79 #define LOSCFG_MEM_MUL_POOL 1 80 #define OS_SYS_MEM_NUM 20 81 /*============================================================================= 82 Exception module configuration 83 =============================================================================*/ 84 #define LOSCFG_PLATFORM_EXC 1 85 /* ============================================================================= 86 printf module configuration 87 ============================================================================= */ 88 #define LOSCFG_KERNEL_PRINTF 1 89 90 #define LOSCFG_BASE_CORE_SCHED_SLEEP 1 91 92 #define LOSCFG_SYS_HEAP_SIZE CFG_OS_SYS_HEAP_SIZE 93 94 //#define LOSCFG_KERNEL_PM 0 95 96 #define LOSCFG_DRIVERS_HDF 1 97 #define LOSCFG_DRIVERS_HDF_PLATFORM 1 98 99 #ifndef LOSCFG_BACKTRACE_DEPTH 100 #define LOSCFG_BACKTRACE_DEPTH 15 101 #endif 102 103 #ifndef LOSCFG_ARCH_HWI_VECTOR_ALIGN 104 #define LOSCFG_ARCH_HWI_VECTOR_ALIGN 0x200 105 #endif 106 107 #ifdef __cplusplus 108 #if __cplusplus 109 } 110 #endif /* __cplusplus */ 111 #endif /* __cplusplus */ 112 113 #endif /* _TARGET_CONFIG_H */ 114