diff --git a/tools/Kconfig b/tools/Kconfig index 8800f09888..34242a581d 100644 --- a/tools/Kconfig +++ b/tools/Kconfig @@ -1,6 +1,7 @@ menu "tools packages" source "$PKGS_DIR/packages/tools/CmBacktrace/Kconfig" +source "$PKGS_DIR/packages/tools/MCoreDump/Kconfig" source "$PKGS_DIR/packages/tools/EasyFlash/Kconfig" source "$PKGS_DIR/packages/tools/EasyLogger/Kconfig" source "$PKGS_DIR/packages/tools/SystemView/Kconfig" diff --git a/tools/MCoreDump/Kconfig b/tools/MCoreDump/Kconfig new file mode 100644 index 0000000000..fb8aa2ebab --- /dev/null +++ b/tools/MCoreDump/Kconfig @@ -0,0 +1,85 @@ + +menuconfig PKG_USING_MCOREDUMP + bool "MCoreDump: Advanced fault backtrace library for ARM Cortex-M series MCU." + default n + +if PKG_USING_MCOREDUMP + + if PKG_USING_MCOREDUMP + + choice + prompt "Select the arch" + default PKG_USING_MCOREDUMP_ARCH_ARMV7M + help + Select the arch + + config PKG_USING_MCOREDUMP_ARCH_ARMV7M + bool "armv7m" + + config PKG_USING_MCOREDUMP_ARCH_ARMV8M + bool "armv8m" + endchoice + + config PKG_USING_MCOREDUMP_EXAMPLE + bool "Using coredump example" + default y + help + Enable MCoreDump example code + + config PKG_MCOREDUMP_MEMORY_SIZE + int "Coredump memory buffer size (bytes)" + default 8192 + range 1024 65536 + help + Size of the static memory buffer for coredump storage. + This buffer is placed in .noinit section and persists across resets. + Minimum: 1KB, Default: 8KB + + config PKG_USING_MCOREDUMP_FILESYSTEM + bool "Using filesystem for coredump storage" + default n + depends on RT_USING_DFS + help + Enable filesystem support for saving coredumps to files. + Requires DFS (Device File System) to be enabled. + If not enabled, filesystem-related functions will be disabled. + + if PKG_USING_MCOREDUMP_FILESYSTEM + + config PKG_MCOREDUMP_FILESYSTEM_DIR + string "Coredump directory path" + default "/sdcard" + help + Directory path where coredump files will be saved. + + config PKG_MCOREDUMP_FILESYSTEM_PREFIX + string "Coredump file prefix" + default "core_" + help + Prefix for coredump filenames. + endif + endif + + config PKG_MCOREDUMP_PATH + string + default "/packages/tools/MCoreDump" + + choice + prompt "Version" + default PKG_USING_MCOREDUMP_LATEST_VERSION + help + Select the this package version + + config PKG_USING_MCOREDUMP_LATEST_VERSION + bool "latest" + endchoice + + config PKG_MCOREDUMP_VER + string + default "latest" if PKG_USING_MCOREDUMP_LATEST_VERSION + + config PKG_MCOREDUMP_VER_NUM + hex + default 0x99999 if PKG_USING_MCOREDUMP_LATEST_VERSION + +endif diff --git a/tools/MCoreDump/package.json b/tools/MCoreDump/package.json new file mode 100644 index 0000000000..635c7267c8 --- /dev/null +++ b/tools/MCoreDump/package.json @@ -0,0 +1,34 @@ +{ + "name": "MCoreDump", + "description": "MCoreDump (mini-coredump) is a fault dump (CoreDump) component designed specifically for embedded systems. It automatically generates standard ELF format core dump files when the system encounters a hard fault, assertion failure, or other abnormal conditions, which can be used for offline debugging and fault analysis.", + "description_zh": "MCoreDump(mini-coredump) 是专为嵌入式系统设计的故障转储(CoreDump)组件,能够在系统发生硬故障(Hard Fault)、断言失败或其他异常情况时,自动生成标准 ELF 格式的核心转储文件,用于离线调试和故障分析。", + "enable": "PKG_USING_MCOREDUMP", + "keywords": [ + "ARM", + "Cortex-M", + "Cortex", + "coredump", + "backtrace", + "callstack", + "hardfault" + ], + "category": "tools", + "author": { + "name": "Rbb666", + "email": "751061401@qq.com", + "github": "Rbb666" + }, + "license": "Apache-2.0", + "repository": "https://github.com/Rbb666/MCoreDump", + "homepage": "https://github.com/Rbb666/MCoreDump#readme", + "doc": "https://github.com/Rbb666/MCoreDump/blob/master/README.md", + "readme": "MCoreDump (mini-coredump) is a fault dump (CoreDump) component designed specifically for embedded systems. It automatically generates standard ELF format core dump files when the system encounters a hard fault, assertion failure, or other abnormal conditions, which can be used for offline debugging and fault analysis.", + "site": [ + { + "version": "latest", + "URL": "https://github.com/Rbb666/MCoreDump.git", + "filename": "MCoreDump.zip", + "VER_SHA": "master" + } + ] +}