From 1418e6c0e1db4421a12bd9a906243778e78ea24a Mon Sep 17 00:00:00 2001 From: wdfk-prog <1425075683@qq.com> Date: Thu, 30 Oct 2025 17:10:47 +0800 Subject: [PATCH] =?UTF-8?q?feat(tools):=20=E4=B8=BA=20CmBacktrace=20?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=BA=E4=BB=B6=E5=8F=8A=E8=BD=AF=E7=A1=AC?= =?UTF-8?q?=E4=BB=B6=E7=89=88=E6=9C=AC=E9=85=8D=E7=BD=AE=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/CmBacktrace/Kconfig | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/tools/CmBacktrace/Kconfig b/tools/CmBacktrace/Kconfig index a7f9f20cdd..a974e12451 100644 --- a/tools/CmBacktrace/Kconfig +++ b/tools/CmBacktrace/Kconfig @@ -5,6 +5,18 @@ menuconfig PKG_USING_CMBACKTRACE if PKG_USING_CMBACKTRACE + config CMBACKTRACE_FIRMWARE_NAME + string "Firmware name for CmBacktrace log identification" + default "rt-thread" + + config CMBACKTRACE_HARDWARE_VER + string "Hardware version for CmBacktrace log identification" + default "1.0" + + config CMBACKTRACE_SOFTWARE_VER + string "Software version for CmBacktrace log identification" + default "1.0" + choice prompt "CPU Platform" default PKG_CMBACKTRACE_PLATFORM_M0_M0PLUS if ARCH_ARM_CORTEX_M0 @@ -67,7 +79,6 @@ if PKG_USING_CMBACKTRACE default y depends on CMB_USING_FAL_FLASH_LOG select RT_USING_DFS if RT_VER_NUM < 0x40100 - select RT_USING_POSIX_FS if RT_VER_NUM >= 0x40100 config CMB_FAL_FLASH_LOG_PART string "The flash partition name for saving log" @@ -76,12 +87,31 @@ if PKG_USING_CMBACKTRACE help The patition name is defined in FAL partiton table. Please make sure it has enough space. + config CMB_FLASH_LOG_PART_WG + int "Flash log partition write granularity (in bytes)" + default 8 + help + Specifies the write granularity of the flash memory used for the log partition. + This value must be a power of 2 (e.g., 1, 2, 4, 8, 16) and should match the + 'write_gran' property of your flash device in the FAL configuration. + Check your MCU's datasheet or BSP's FAL setup for the correct value. + config CMB_LOG_FILE_PATH string "The backup log file's path" default "/log/cmb.log" depends on CMB_USING_FAL_BACKUP_LOG_TO_FILE endif + config PKG_CMBACKTRACE_ENABLE_TEST + bool "Enable MSH test commands for CmBacktrace" + default n + help + If you select this option, MSH commands like 'cmb_test' will be + compiled. This allows you to trigger faults (e.g., division by + zero, unaligned access) from the console to test the backtrace + functionality. + Disable this for release versions to save code size. + config PKG_CMBACKTRACE_PATH string default "/packages/tools/CmBacktrace"