From ecaf266d722ec9a332647327a926eb19d7e5fc37 Mon Sep 17 00:00:00 2001 From: yinjiaming Date: Thu, 31 Aug 2023 17:43:16 +0800 Subject: [PATCH] =?UTF-8?q?fix:Kconfig=20=E4=B8=8Etarget=5Fconfig.h?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=8B=86=E5=88=86=20=E6=A0=B9=E6=8D=AE=20Kco?= =?UTF-8?q?nfig=20=E4=B8=8E=20target=5Fconfig.h=20=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E7=9A=84=E7=89=B9=E7=82=B9=20=E5=AF=B9?= =?UTF-8?q?=E5=8E=9F=E6=9C=89=E7=9A=84=E7=BC=96=E8=AF=91=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E4=BA=86=E8=B0=83=E6=95=B4=E4=B8=8E=E6=8B=86?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yinjiaming Change-Id: I6483bd6a7a59492ae468d129fad2fb5c992c3b01 --- arm_mps2_an386/liteos_m/board/target_config.h | 57 +++++++++++++------ riscv32_virt/liteos_m/board/target_config.h | 14 +++++ 2 files changed, 54 insertions(+), 17 deletions(-) diff --git a/arm_mps2_an386/liteos_m/board/target_config.h b/arm_mps2_an386/liteos_m/board/target_config.h index 0b984fe..8b32edc 100644 --- a/arm_mps2_an386/liteos_m/board/target_config.h +++ b/arm_mps2_an386/liteos_m/board/target_config.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2013-2019 Huawei Technologies Co., Ltd. All rights reserved. - * Copyright (c) 2020-2021 Huawei Device Co., Ltd. All rights reserved. + * Copyright (c) 2020-2023 Huawei Device Co., Ltd. All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: @@ -44,15 +44,11 @@ =============================================================================*/ #define OS_SYS_CLOCK SYSCLK_FREQ #define LOSCFG_BASE_CORE_TICK_PER_SECOND (100UL) -#define LOSCFG_BASE_CORE_TICK_HW_TIME 0 -#define LOSCFG_BASE_CORE_TICK_WTIMER 0 #define LOSCFG_BASE_CORE_TICK_RESPONSE_MAX 0xFFFFFFUL /*============================================================================= Hardware interrupt module configuration =============================================================================*/ -#define LOSCFG_PLATFORM_HWI 1 -#define LOSCFG_USE_SYSTEM_DEFINED_INTERRUPT 1 #define LOSCFG_PLATFORM_HWI_LIMIT 128 /*============================================================================= Task module configuration @@ -63,42 +59,31 @@ #define LOSCFG_BASE_CORE_TSK_MIN_STACK_SIZE (0x130U) #define LOSCFG_BASE_CORE_TIMESLICE 1 #define LOSCFG_BASE_CORE_TIMESLICE_TIMEOUT 20000 -#define LOSCFG_BASE_CORE_TSK_MONITOR 1 -#define LOSCFG_BASE_CORE_EXC_TSK_SWITCH 1 /*============================================================================= Semaphore module configuration =============================================================================*/ -#define LOSCFG_BASE_IPC_SEM 1 #define LOSCFG_BASE_IPC_SEM_LIMIT 48 /*============================================================================= Mutex module configuration =============================================================================*/ -#define LOSCFG_BASE_IPC_MUX 1 #define LOSCFG_BASE_IPC_MUX_LIMIT 24 /*============================================================================= Queue module configuration =============================================================================*/ -#define LOSCFG_BASE_IPC_QUEUE 1 #define LOSCFG_BASE_IPC_QUEUE_LIMIT 24 /*============================================================================= Software timer module configuration =============================================================================*/ -#define LOSCFG_BASE_CORE_SWTMR 1 -#define LOSCFG_BASE_CORE_SWTMR_ALIGN 1 #define LOSCFG_BASE_CORE_SWTMR_LIMIT 48 /*============================================================================= Memory module configuration =============================================================================*/ extern unsigned int __heap_start; extern unsigned int __heap_size; -#define LOSCFG_SYS_EXTERNAL_HEAP 1 #define LOSCFG_SYS_HEAP_ADDR (void *)&__heap_start #define LOSCFG_SYS_HEAP_SIZE (unsigned int)&__heap_size -#define LOSCFG_MEM_MUL_POOL 1 #define OS_SYS_MEM_NUM 20 -#define LOSCFG_MEM_FREE_BY_TASKID 1 -#define LOSCFG_MEMORY_BESTFIT 1 /* ============================================================================= printf module configuration @@ -110,7 +95,45 @@ extern unsigned int __heap_size; /*============================================================================= shell module configuration =============================================================================*/ -#define LOSCFG_USE_SHELL 1 #define LOSCFG_SHELL_PRIO 3 +#define LOSCFG_SHELL_STACK_SIZE 4096 + +/*============================================================================= + backtrace module configuration +=============================================================================*/ +#if (LOSCFG_KERNEL_BACKTRACE == 1) +#define LOSCFG_BACKTRACE_DEPTH 15 +#endif +#if (LOSCFG_KERNEL_TRACE == 1) +#define LOSCFG_TRACE_FRAME_MAX_PARAMS 3 +#endif +#if (LOSCFG_RECORDER_MODE_OFFLINE == 1) +#define LOSCFG_TRACE_BUFFER_SIZE 2048 +#endif + +/*============================================================================= + security module configuration +=============================================================================*/ +#if (LOSCFG_SECURE_TRUSTZONE == 1) +#define LOSCFG_SECURE_HEAP_SIZE 2048 +#endif + +/*============================================================================= + file system module configuration +=============================================================================*/ +#if (LOSCFG_FS_VFS == 1) +#define LOSCFG_FS_LOCK_TIMEOUT -1 +#endif +#if (LOSCFG_FS_LITTLEFS == 1) +#define LOSCFG_LFS_MAX_MOUNT_SIZE 3 +#define LOSCFG_LFS_MAX_OPEN_FILES 100 +#endif + +/*============================================================================= + lms module configuration +=============================================================================*/ +#if (LOSCFG_KERNEL_LMS == 1) +#define LOSCFG_LMS_MAX_RECORD_POOL_NUM 50 +#endif #endif /* _TARGET_CONFIG_H */ diff --git a/riscv32_virt/liteos_m/board/target_config.h b/riscv32_virt/liteos_m/board/target_config.h index c1b7785..7168237 100644 --- a/riscv32_virt/liteos_m/board/target_config.h +++ b/riscv32_virt/liteos_m/board/target_config.h @@ -100,6 +100,20 @@ extern UINTPTR __heap_size; #define LOSCFG_USE_SHELL 1 #define LOSCFG_SHELL_PRIO 3 +/*============================================================================= + backtrace module configuration +=============================================================================*/ +#if (LOSCFG_KERNEL_BACKTRACE == 1) +#define LOSCFG_BACKTRACE_DEPTH 15 +#endif + +/*============================================================================= + file system module configuration +=============================================================================*/ +#if (LOSCFG_FS_VFS == 1) +#define LOSCFG_FS_LOCK_TIMEOUT -1 +#endif + extern UINT32 QemuCLZ(UINT32); #undef CLZ #define CLZ(n) QemuCLZ(n) -- Gitee