Upgrade ODP mainline to latest embassy-sync (non-reentrant blocking `Mutex`, `ThreadModeRawMutex` removed)
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 重构
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
- 领域
- embedded-iot
调研方向
Start by reviewing the pinned embassy git revisions in odp-embedded-controller’s dev-mcxa and dev-mec fork dependencies, then check the firmware lockfiles for embassy-sync versions. Update the pins when compatible releases are available and build the firmware; done means CI passes with one embassy-sync version per firmware lockfile and no removed APIs or feature references.
由索引模型根据 Issue 内容生成。
描述
Background
embassy-rs/embassy#7634 (merged, not yet released) changes embassy-sync's blocking mutex:
ThreadModeMutex/ThreadModeRawMutexare removed.- The blocking
Mutexis no longer reentrant:locknow gives&mut T, and locking the same mutex again from insidelockpanics. lock_mutandMutex::borrow(cs)are removed (uselock, orcritical_section::Mutex).RawMutexis now implemented for anymutex_traits::ScopedRawMutex + ConstInit.- The
stdfeature is removed. - A new portable
PanicRawMutexis added. It panics on contention rather than being thread-mode-only.
Related embassy-sync changes in the same release: GenericAtomicWaker removed; AtomicWaker is now lock-free and requires re-registering the waker on every poll.
See the CHANGELOG.
Impact assessment (ODP default branches)
A reentrancy audit found no code that locks the same blocking mutex twice. Host unit tests pass unchanged against embassy main once the std feature is dropped (embedded-services 504, tps6699x 168, pcal6416a 59).
| Repo | Required change |
|---|---|
| embedded-services | Drop embassy-sync "std" feature (6 Cargo.toml); Cortex-M GlobalRawMutex → PanicRawMutex; power_button example off ThreadModeRawMutex |
| embassy-imxrt | time_driver/{ostimer,rtc}.rs: blocking_mutex::Mutex + borrow(cs) → critical_section::Mutex |
| embassy-npcx | time_driver.rs: same as above; i2c_slave example off ThreadModeRawMutex |
| pcal6416a | Drop "std" from embassy-sync dev-dependency |
| pico-de-gallo | Bump from embassy-sync 0.7.2; replace ThreadModeRawMutex; needs matching embassy-rp / embassy-usb / postcard-rpc releases |
| odp-embedded-controller | Bump pinned embassy git revs (dev-mcxa, dev-mec fork) |
| embedded-perfmon | Bump pinned embassy git rev in examples/rtt |
| tps6699x, ec-slimloader, is31fl3743b | No source change expected; version bump only |
Also review: HAL futures that use AtomicWaker must call register() on every poll.
Plan
- Open draft PRs in each repo against embassy
main(via[patch.crates-io]) to validate on CI. - When
embassy-syncis released, replace the patch with the released version and bump the rest of the embassy crates together. - Merge in dependency order: HALs (embassy-imxrt, embassy-npcx) → drivers (tps6699x, pcal6416a) → embedded-services → platforms (odp-embedded-controller, pico-de-gallo, ec-slimloader).
Done when
- All ODP repos build and pass CI on the released
embassy-sync - No
ThreadModeRawMutex/borrow(cs)/embassy-sync/stdleft - Only one
embassy-syncversion in each firmware lockfile
Draft PRs: (links added once created)
- 主要语言
- Rust
- 星标
- 3
- 派生
- 8
- 平均合并
- 7 小时 51 分钟
- 30 天内合并 PR
- 3
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
OpenDevicePartnership/odp-embedded-controller 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 3/5 1-2 天 新手友好度 74/100
-
dev-qemu: Move to merged TimeAlarm wake API可能已有人在做 @dymk 于 21 天前认领。 未关闭enhancement
OpenDevicePartnership/odp-embedded-controller#54 · 已指派 1 人 ·
查看 OpenDevicePartnership/odp-embedded-controller 的全部 Issue
相似的 Issue
-
app bug session
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
marketing
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 1/5 1 小时以内 新手友好度 92/100
维护者通常 1 天内回复
-
macOS autosubmit enable passes unsupported --wait to launchctl bootout可能已有人在做 @iqdoctor 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
junhoyeo/tokscale#1713 · 3 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复