[Feature Request] <Support CmBacktrace to avoid repeated code modifications能否原生支持 CmBacktrace?减少重复修改代码的麻烦>
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 功能
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- c
- 领域
- embedded-iot
调研方向
The request mentions task.c and freertos.h, and proposes exposing task stack size and task information for CmBacktrace. Start by reading those files and the task creation and inspection APIs to understand how task details are represented. Done would mean an agreed interface that provides the needed task details without repeated manual edits; the issue does not specify that interface or its scope.
由索引模型根据 Issue 内容生成。
描述
Dear FreeRTOS Team,
First of all, I'd like to express my sincere gratitude for your selfless contributions. FreeRTOS has made multi-tasking development on MCUs incredibly convenient, and I've been using it extensively—it’s always performed stably and reliably.
Recently, I encountered occasional HardFault issues while working on a complex project. To quickly identify the root cause, I integrated the CmBacktrace debugging component. However, I ran into a small problem: for CmBacktrace to trace faults in a FreeRTOS environment, it needs access to task-specific information like stack address, stack size, and task name. This requires manual modifications to FreeRTOS’s task.c and freertos.h (e.g., adding a stack size member to the TCB, implementing simple APIs to retrieve task info).
The hassle is that every time I regenerate code with CubeMX, these manual changes get overwritten, forcing me to reapply them repeatedly. It’s become quite tedious over time—my wrist is practically begging for mercy (haha).
So I’m writing to propose: Could you consider adding these basic variables (e.g., task stack size) and simple interfaces directly into the FreeRTOS source code? This would enable native support for debugging tools like CmBacktrace, lowering the debugging barrier for developers and enhancing FreeRTOS’s ecosystem compatibility.
Thank you again for all your hard work. Looking forward to your thoughts!
各位 FreeRTOS 项目组的大佬好!
首先由衷感谢大家的无私贡献,让我们能在 MCU 上便捷地开发多任务项目。我一直深度使用 FreeRTOS,它的稳定性和易用性都非常出色。
近期我在开发一个复杂项目时,偶尔会遇到 HardFault 问题。为了快速定位故障根源,我引入了 CmBacktrace 调试组件,但遇到了一个小麻烦:CmBacktrace 在 FreeRTOS 环境下追踪故障时,需要获取任务的栈地址、栈大小和任务名等信息,这就要求我手动修改 FreeRTOS 的 task.c 和 freertos.h(比如在 TCB 中新增栈大小成员、添加获取任务信息的接口函数)。
问题在于,我使用 CubeMX 频繁重新生成代码时,这些手动修改会被覆盖,每次都要重新调整 —— 长期下来重复操作繁琐,手腕都快扛不住了(笑)。
所以想向各位大佬提议:能否在 FreeRTOS 源码中直接添加这些基础变量(如任务栈大小)和简单接口,以原生支持 CmBacktrace 这类调试工具的集成?这样既能降低开发者的调试门槛,也能让 FreeRTOS 的生态兼容性更完善。
再次感谢大家的付出,期待各位的回复!
- 主要语言
- C
- 星标
- 8k
- 派生
- 2.1k
- 平均合并
- 18 天 1 小时
- 30 天内合并 PR
- 2
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
FreeRTOS/FreeRTOS 的其他 Issue
-
[BUG] task-stats sample overflow its output buffer as the application task set grows可能已有人在做 @20000419 于 69 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 35/100
-
bug
难度 4/5 3-5 天 新手友好度 20/100
-
enhancement feature request help wanted
难度 4/5 3-5 天 新手友好度 30/100
-
[BUG] SMP Testing Issue on AARCH64: Individual Tests Pass but Combined Tests Fail可能重新可做 @chinglee-iot 于 491 天前认领,目前没有进行中的 PR。 未关闭bug
-
enhancement
难度 5/5 一周以上 新手友好度 15/100
查看 FreeRTOS/FreeRTOS 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 72/100
-
bug
难度 1/5 1 小时以内 新手友好度 63/100
FreeRTOS/FreeRTOS-Plus-TCP#1395 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
qoretechnologies/qore#8222 ·
维护者通常 1 天内回复
-
c easy first-contributor first-contributors good first issue help wanted up-for-grabs
难度 1/5 1-3 小时 新手友好度 96/100
fork-commit-merge/fork-commit-merge#8696 ·
维护者通常 1 天内回复