esp-rs / esp8266-hal

A experimental hardware abstraction layer for the esp8266 written in Rust.
Apache License 2.0
157 stars 16 forks source link

undefined reference to all atomic operations #15

Closed DusterTheFirst closed 3 years ago

DusterTheFirst commented 3 years ago

When using this HAL crate, and attempting to use any atomic operation or even CriticalSectionSpinLockMutex, I am faced with the error

undefined reference to `__sync_val_compare_and_swap_1'

I have assumed that that means that the compiler does not have the intrinsics to implement the Atomics and have steered away from using them entirely, but the Atomic{u/i8-u/i32}{bool} operations are all avaliable in the core crate and are even used in the library ie. CriticalSectionSpinLockMutex. Is my setup incorrect or are atomic operations unsupported on the esp8266

DusterTheFirst commented 3 years ago

Answered with a solution in https://github.com/esp-rs/rust-build/issues/3