Skip to content

core: Add opt-in portable-atomic support for targets without atomic CAS - #239

Open
orielhaim wants to merge 1 commit into
trussed-dev:mainfrom
orielhaim:fix/thumbv6m-atomics
Open

orielhaim wants to merge 1 commit into
trussed-dev:mainfrom
orielhaim:fix/thumbv6m-atomics

Conversation

@orielhaim

@orielhaim orielhaim commented Nov 1, 2026 •

Copy link
Copy Markdown

Adds optional portable-atomic support to trussed-core for targets without native atomic CAS, including Cortex-M0/M0+ (RP2040) and RISC-V

InterruptFlag and ResetSignalAllocation currently use AtomicU8::compare_exchange which isn't available on these targets

The new feature switches both to portable_atomic::AtomicU8 using an interrupt-based fallback on bare-metal ARM/RISC-V without requiring a critical-section implementation

Default builds remain unchanged, and targets with native CAS continue using it

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant