Drop the EmbassyUart flush-per-write workaround once embassy-stm32 ships the BufferedUart TX fix

オープン
#385 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
20/100
issue の種類
リファクタリング
明瞭さ
おおむね明確
活発さ
活発
技術スタック
embedded-iot, rust
領域
embedded-iot

調査の方向性

The workaround lives in aimdb-embassy-adapter/src/io.rs, where EmbassyUart and EmbassyUartWriter route write_all through write_all_flushed; the flush-count assertions are in that file's tests. Bump embassy-stm32 in the workspace Cargo.toml only once a release containing upstream commit 560ad7e91 exists, then switch to plain write_all and update CHANGELOG.md. Done means the NUCLEO-H563ZI full record.list reply arrives on fresh boot with no RX traffic, which needs hardware and is not a newcomer task yet.

索引モデルが issue の本文から書いたものです。

説明

dependencies

Tracking issue for option 1 of #382.

Background

embassy-stm32 0.6.0's BufferedUart::write returns Poll::Pending without registering a TX waker when the ring has less free space than the chunk, so the first large reply after boot stalls after 256 B (see #382). #384 works around it in aimdb-embassy-adapter/src/io.rs: EmbassyUart's write_all (and the split writer's) goes through write_all_flushed, which flushes after every chunk. That costs a short gap on the line every 64 B.

Upstream fixed it on embassy main in 560ad7e91 ("stm32: fix embedded_io::Write impl for BufferedUartTx", 2026-07-17). It is not in a crates.io release yet; 0.6.0 is still the latest. Pinning embassy-stm32 to a git rev alone does not resolve (embassy-time-driver conflict), so it would mean moving the whole embassy-* family to git.

To do once a release with 560ad7e91 is out

  • Bump embassy-stm32 in the workspace Cargo.toml (and any embassy-* crates it pulls along).
  • Replace write_all_flushed with plain write_all in EmbassyUart and EmbassyUartWriter; revert the flush-count assertions in the io.rs tests.
  • Drop the workaround's Fixed note from aimdb-embassy-adapter/CHANGELOG.md, or record the removal.
  • Re-verify on the NUCLEO-H563ZI: fresh boot → serial_demo client (or serial_demo raw … record.list) straight away, on the serial, MQTT and KNX demos. The full record.list reply must arrive without any RX traffic to kick it. The aimdb CLI is not a valid check: its small hello reply arms the waker first, so it passes even on unfixed firmware.
主要言語
Rust
スター
101
フォーク
20
平均マージ
2時間 33分
マージ済み PR(30日)
90

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

aimdb-dev/aimdb のほかの issue

aimdb-dev/aimdb の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。