Report watchdog restarts and which loop step stalled
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 76/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- c
- 領域
- embedded-iot
調査の方向性
Read src/utils/watchdog.cpp and src/hello_robot.cpp, especially run() and crash_report(), then compare how teensy4/CrashReport.cpp reads SRC_SRSR and how teensy4/imxrt.h defines its watchdog bit. Trace the main loop steps and watchdog callback; test on a bare Teensy with a temporary forced hang, removing it before opening a PR. Done means a watchdog restart logs its cause and last loop step, while normal power-on logs no watchdog message.
索引モデルが issue の本文から書いたものです。
説明
When the main loop stalls, the watchdog restarts the Teensy, but nothing tells us it was the watchdog or which part of the loop hung. See the TODO in src/utils/watchdog.cpp ("Read and print a flag to identify the cause of stall").
Good first task. Needs a bare Teensy, no robot.
Files
src/utils/watchdog.cpp,src/utils/watchdog.hppsrc/hello_robot.cpp(run()andcrash_report())teensy4/CrashReport.cpp(reference, readsSRC_SRSRaround line 160)teensy4/imxrt.h(SRC_SRSR_*bits)
Steps
- Our watchdog is
WDT_T4<WDT1>, which sets theSRC_SRSR_WDOG_RST_Bbit inSRC_SRSRon reset.CrashReport.breadcrumb(n, value)stores a value that survives a restart. - In
HelloRobot::run(), before each main step (sensors, controls, comms, ...), record a step number withCrashReport.breadcrumb(1, step). Use a small enum for the steps. - At boot, before
crash_report(), readSRC_SRSR. If the watchdog bit is set, log "Restarted by watchdog" and the last step viaSystemLog. - Don't clear
SRC_SRSRyourself;CrashReportreads it too. CheckCrashReport.cppbefore writing to the register. - Fill in the TODO in
watchdog_callback()by printing the current step there as well. - Test on a bare Teensy with a temporary forced hang (
while (true) {}inside one step). Remove it before opening the PR.
Done when
- After a forced hang, the next boot says the watchdog caused the restart and names the step.
- A normal power-on prints no watchdog message.
Related: #211 (safety asserts currently end in a watchdog reset).
- 主要言語
- C
- スター
- 11
- フォーク
- 2
- 平均マージ
- 18日 3時間
- マージ済み PR(30日)
- 3
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CU-Robotics/firmware のほかの issue
-
good first issue not started
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
CU-Robotics/firmware#257 ·
-
Pre-flight checksオープンin progress
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
CU-Robotics/firmware#222 ·
-
Fix existing clang-tidy findings対応中かも @roccoagain が今日担当しました。 オープン
CU-Robotics/firmware#262 · 担当者 1 名 ·
-
not started
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
CU-Robotics/firmware#258 ·
-
in progress software-in-the-loop
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
CU-Robotics/firmware#250 · コメント 1 件 ·
CU-Robotics/firmware の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
schrodinger/pymol-open-source#532 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 86/100
CTSRD-CHERI/cheribsd#2769 ·
メンテナーはふだん 2 日以内に返信
-
documentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
severity: low
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
luainkernel/lunatik#2633 ·
メンテナーはふだん 1 日以内に返信
-
type: bug
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信