1 /* 2 * Copyright (c) 2022 Talkweb 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 #include "stm32f4xx.h" 21 /*============================================================================= 22 System clock module configuration 23 =============================================================================*/ 24 #define OS_SYS_CLOCK 168000000 25 #define LOSCFG_BASE_CORE_TICK_PER_SECOND (1000UL) 26 #define LOSCFG_BASE_CORE_TICK_HW_TIME 0 27 #define LOSCFG_BASE_CORE_TICK_WTIMER 0 28 #define LOSCFG_BASE_CORE_TICK_RESPONSE_MAX 0xFFFFFFUL 29 30 /*============================================================================= 31 Hardware interrupt module configuration 32 =============================================================================*/ 33 #define LOSCFG_PLATFORM_HWI 1 34 #define LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT 1 35 #define LOSCFG_PLATFORM_HWI_LIMIT 128 36 #define LOSCFG_ARCH_HWI_VECTOR_ALIGN 0x200 37 /*============================================================================= 38 Task module configuration 39 =============================================================================*/ 40 #define LOSCFG_BASE_CORE_TSK_LIMIT 63 41 #define LOSCFG_BASE_CORE_TSK_IDLE_STACK_SIZE (0x1000U) 42 #define LOSCFG_BASE_CORE_TSK_DEFAULT_STACK_SIZE (0x1000U) 43 #define LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE (ALIGN(0x80, 4)) 44 #define LOSCFG_BASE_CORE_TIMESLICE 1 45 #define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT 10 46 #define LOSCFG_BASE_CORE_TSK_MONITOR 1 47 #define LOSCFG_BASE_CORE_EXC_TSK_SWITCH 0 48 49 /*============================================================================= 50 Semaphore module configuration 51 =============================================================================*/ 52 #define LOSCFG_BASE_IPC_SEM 1 53 #define LOSCFG_BASE_IPC_SEM_LIMIT 48 54 /*============================================================================= 55 Mutex module configuration 56 =============================================================================*/ 57 #define LOSCFG_BASE_IPC_MUX 1 58 #define LOSCFG_BASE_IPC_MUX_LIMIT 32 59 /*============================================================================= 60 Queue module configuration 61 =============================================================================*/ 62 #define LOSCFG_BASE_IPC_QUEUE 1 63 #define LOSCFG_BASE_IPC_QUEUE_LIMIT 24 64 /*============================================================================= 65 Software timer module configuration 66 =============================================================================*/ 67 #define LOSCFG_BASE_CORE_SWTMR 1 68 #define LOSCFG_BASE_CORE_SWTMR_ALIGN 1 69 #define LOSCFG_BASE_CORE_SWTMR_LIMIT 48 70 /*============================================================================= 71 Memory module configuration 72 =============================================================================*/ 73 extern unsigned int __los_heap_addr_start__; 74 extern unsigned int __los_heap_addr_end__; 75 #define LOSCFG_SYS_EXTERNAL_HEAP 1 76 #define LOSCFG_SYS_HEAP_ADDR ((void *)&__los_heap_addr_start__) 77 #define LOSCFG_SYS_HEAP_SIZE (((unsigned long)&__los_heap_addr_end__) - ((unsigned long)&__los_heap_addr_start__)) 78 #define LOSCFG_MEM_MUL_POOL 1 79 #define OS_SYS_MEM_NUM 20 80 #define LOSCFG_MEM_FREE_BY_TASKID 1 81 #define LOSCFG_BASE_MEM_NODE_INTEGRITY_CHECK 1 82 #define LOSCFG_MEM_LEAKCHECK 0 83 84 /*============================================================================= 85 Exception module configuration 86 =============================================================================*/ 87 #define LOSCFG_PLATFORM_EXC 0 88 89 #endif /* _TARGET_CONFIG_H */ 90