Upgrade ODP mainline to latest embassy-sync (non-reentrant blocking `Mutex`, `ThreadModeRawMutex` removed)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Refactoring
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- rust
- Ambito
- embedded-iot
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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)
- Lingua principale
- Rust
- Stelle
- 3
- Fork
- 8
- Merge medio
- 7h 51m
- PR unite (30g)
- 3
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenDevicePartnership/odp-embedded-controller
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
-
dev-qemu: Move to merged TimeAlarm wake APIForse già presa @dymk l’ha presa 21 giorni fa. Apertaenhancement
OpenDevicePartnership/odp-embedded-controller#54 · 1 assegnatario ·
Tutte le issue di OpenDevicePartnership/odp-embedded-controller
Issue simili
-
platform:windows provider:antigravity-cli providers setup triaged wontfix
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
can1357/oh-my-pi#21349 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 92/100
erkamyaman/rea-games#246 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
aaif-goose/goose#13970 ·
I maintainer di solito rispondono entro 1 giorno
-
comp-documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
ClickHouse/ClickHouse#136277 ·
I maintainer di solito rispondono entro 1 giorno