Hello
I'm trying to build a project for the M0+ of the RP2040 (thumbv6m-none-eabi ), I copy-pasted some code I got working for the stm32f4discovery (thumbv7em-none-eabihf), and this message shows up:
$ xargo build --target thumbv6m-none-eabi
Compiling spin v0.5.2
Compiling num-integer v0.1.44
error[E0599]: no method named `compare_and_swap` found for struct `AtomicBool` in the current scope
--> /home/debuti/.cargo/registry/src/github.com-1ecc6299db9ec823/spin-0.5.2/src/mutex.rs:131:25
|
131 | while self.lock.compare_and_swap(false, true, Ordering::Acquire) != false
| ^^^^^^^^^^^^^^^^ method not found in `AtomicBool`
error[E0599]: no method named `compare_and_swap` found for struct `AtomicBool` in the current scope
--> /home/debuti/.cargo/registry/src/github.com-1ecc6299db9ec823/spin-0.5.2/src/mutex.rs:181:22
|
181 | if self.lock.compare_and_swap(false, true, Ordering::Acquire) == false
| ^^^^^^^^^^^^^^^^ method not found in `AtomicBool`
...
I tried all combinations for stable and nightly, xargo and cargo, and (just in case although it seems to have nothing to do) spin 0.5.2 and 0.9.0
The issue is easily reproducible
rustup target add thumbv6m-none-eabi
mkdir repr_issue
cd repr_issue/
cargo init
echo "spin = \"0.5.2\"" >> Cargo.toml
cargo build --target thumbv6m-none-eabi
Thanks in advance!