[Compiling]: inline assembly is unsupported on this target
Closed this issue · 3 comments
Hi, ESP-RS team,
I try to compile the project with the installed tooltain.
When I build the project with the command, cargo build -Zbuild-std=core, it generates the error as below:
error[E0472]: inline assembly is unsupported on this target
--> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/xtensa-lx-rt-0.7.0/src/exception/assembly_lx6.rs:1:1
|
1 | / global_asm!(
2 | | "
3 | | .set XT_STK_PC, 0
4 | | .set XT_STK_PS, 4
... |
70 | | "
71 | | );
| |__^
|
= note: this error originates in the macro global_asm
(in Nightly builds, run with -Z macro-backtrace for more info)
Please help have a check and give some hints.
This repo hasn't been updated to use the new hal and xtensa-lx crates, see: https://github.com/esp-rs/esp32-hal/blob/master/CHANGELOG.md#v030---2021-08-12.
Hi, @MabezDev ,
I try to compile the esp-hal and xtensa-lx-rt crates alone, they will generate similar errors, like:
`error[E0472]: inline assembly is unsupported on this target
--> src/lib.rs:97:5
|
97 | asm!("wsr.vecbase {0}", in(reg) base, options(nostack));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: could not compile xtensa-lx-rt
due to 32 previous errors`
My build command is "cargo build --features=lx6 --target=xtensa-esp32-none-elf -Zbuild-std=core". And I'm not sure if the version of toolchain is the root cause?
for rustc,
/home/***/private/rust/build/x86_64-unknown-linux-gnu/stage2/bin# ./rustc --version
rustc 1.54.0-dev
for toolchain setting ,
/home/***/private/esp32/xtensa-lx-rt# rustup toolchain list
stable-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu
esp (default)
The latest commit in the esp branch of the compiler contains the Xtensa assembly support, you'll need to rebuild your compiler: https://github.com/esp-rs/rust.