This PR substitutes imports to core::sync::atomic to atomic_polyfill. In this way, we can now build e310x-hal for riscv32imc-unknown-none-elf targets.
The E310X board does NOT support the lr nor the sc atomic instructions (...). Thus, atomic functions such as compare_exchange trigger an exception. For those projects that use these functions (e.g., RTIC), we need to allow builds for riscv32imc-unknown-none-elf and let atomic-polyfill do the trick.
This PR substitutes imports to
core::sync::atomic
toatomic_polyfill
. In this way, we can now builde310x-hal
forriscv32imc-unknown-none-elf
targets.The E310X board does NOT support the
lr
nor thesc
atomic instructions (...). Thus, atomic functions such ascompare_exchange
trigger an exception. For those projects that use these functions (e.g., RTIC), we need to allow builds forriscv32imc-unknown-none-elf
and letatomic-polyfill
do the trick.