A problem with rust and esp

Guys i'm studying rust with esp but i have a problem with this line #![feature(asm_experimental_arch)] it says that it can be only compiled with rust nightly but when i run the cargo with the nightly it doesn't compile because of the esp and it say's: invalid instruction mnemonic but it compiles this part without the nightly what should i do?

Please post code, contents of Cargo.toml and other config files as well as the cargo build commands and their output.
You can put these things between sets of ``` like

```
Some file content or command in bash
```

To get a nice output like

Some file content or command in bash

main:
#![no_std]
#![no_main]

// use dht_sensor::;
use esp32_hal::{
clock::ClockControl, peripherals::Peripherals, prelude::
, timer::TimerGroup, Delay, Rtc, IO,
};
use esp_backtrace as _;
use esp_println::println;
use xtensa_lx_rt::entry;

#[entry]
fn main() -> ! {
let peripherals = Peripherals::take();
let system = peripherals.DPORT.split();
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();

// Disable the RTC and TIMG watchdog timers
let mut rtc = Rtc::new(peripherals.RTC_CNTL);
let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks);
let mut wdt0 = timer_group0.wdt;
let timer_group1 = TimerGroup::new(peripherals.TIMG1, &clocks);
let mut wdt1 = timer_group1.wdt;

// Disable watchdog timer
rtc.rwdt.disable();
wdt0.disable();
wdt1.disable();

let mut delay = Delay::new(&clocks);
let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
let mut led = io.pins.gpio4.into_push_pull_output();
led.set_high().unwrap();

// let mut dht_pin = io.pins.gpio23.into_open_drain_output();
// dht_pin.set_high().ok();
// delay.delay_ms(1000u32);

loop {
    println!("Hello World!");
    led.toggle().unwrap();

    // match dht22::Reading::read(&mut delay, &mut dht_pin) {
    //     Err(e) => println!("Error {:?}", e),
    //     Ok(dht22::Reading {
    //         temperature,
    //         relative_humidity,
    //     }) => println!("{}°, {}% RH", temperature, relative_humidity),
    // }

    delay.delay_ms(1000u32);
}

}
cargo.toml:
[package]

name = "iot_sensor"

version = "0.1.0"

authors = ["Rama Rahardi rama.orion@gmail.com"]

edition = "2021"

license = "MIT OR Apache-2.0"

[dependencies]

esp32-hal = "0.10.0"

esp-backtrace = { version = "0.6.0", features = [

"esp32",

"panic-handler",

"print-uart",

] }

esp-println = { version = "0.4.0", features = ["esp32"] }

xtensa-lx-rt = { version = "0.15.0", features = ["esp32"], optional = true }

#dht-sensor = "0.2.1"

[features]

default = ["rt"]

rt = ["xtensa-lx-rt"]
diagram.json:
{
"version": 1,
"author": "Sergio Gasquez Arcos",
"editor": "wokwi",
"parts": [
{
"type": "wokwi-esp32-devkit-v1",
"id": "esp",
"top": 0,
"left": 0.67,
"attrs": { "builder": "rust-nostd-esp" }
},
{
"type": "wokwi-resistor",
"id": "r1",
"top": 110.58,
"left": 123.26,
"attrs": { "value": "1000" }
},
{
"type": "wokwi-led",
"id": "led1",
"top": 54.07,
"left": 174.99,
"attrs": { "color": "red", "flip": "1" }
},
{ "type": "wokwi-dht22", "id": "dht2", "top": -125.61, "left": 249.11, "attrs": {} }
],
"connections": [
[ "esp:TX0", "$serialMonitor:RX", "", ],
[ "esp:RX0", "$serialMonitor:TX", "", ],
[ "esp:GND.1", "led1:C", "black", [ "h0" ] ],
[ "led1:A", "r1:2", "green", [ "v0" ] ],
[ "esp:D4", "r1:1", "green", [ "h0" ] ],
[ "esp:D23", "dht2:SDA", "green", [ "h0" ] ],
[ "dht2:VCC", "esp:3V3", "red", [ "v0" ] ],
[ "dht2:GND", "esp:GND.1", "black", [ "v0" ] ]
],
"serialMonitor": { "display": "terminal" },
"dependencies": {}
}

Again, try to wrap all files and outputs in backticks. You can press the little monitor icon on the bottom right of the editor to get a preview of how your post will look. Also you forgot to include the build commands.

1 Like

ok sorry
build: cargo run

 --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/lib.rs:2:1
  |
2 | #![feature(cfg_version)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
 --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-0.8.0/src/lib.rs:4:1
  |
4 | #![feature(asm_experimental_arch)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
 --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/lib.rs:4:1
  |
4 | #![feature(asm_experimental_arch)]
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0554]: #![feature] may not be used on the stable release channel
 --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/lib.rs:6:1
  |
6 | #![feature(naked_functions)]

And what's the output when you execute cargo +nightly run?

   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:237:5
    |
237 |     call0 __naked_level_6_interrupt     // used as long jump
    |     ^
    |
note: instantiated into assembly here
   --> <inline asm>:4:5
    |
4   |     call0 __naked_level_6_interrupt     // used as long jump
    |     ^^^^^

error: invalid instruction mnemonic 'wsr'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:249:5
    |
249 |     wsr a0, EXCSAVE7 // preserve a0
    |     ^
    |
note: instantiated into assembly here
   --> <inline asm>:3:5
    |
3   |     wsr a0, EXCSAVE7 // preserve a0
    |     ^^^

error: invalid instruction mnemonic 'call0'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:250:5
    |
250 |     call0 __naked_level_7_interrupt     // used as long jump
    |     ^
    |
note: instantiated into assembly here
   --> <inline asm>:4:5
    |
4   |     call0 __naked_level_7_interrupt     // used as long jump
    |     ^^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:262:9
    |
262 |         s32e    a0, a5, -16
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:3:9
    |
3   |         s32e    a0, a5, -16
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:263:9
    |
263 |         s32e    a1, a5, -12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:4:9
    |
4   |         s32e    a1, a5, -12
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:264:9
    |
264 |         s32e    a2, a5,  -8
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:5:9
    |
5   |         s32e    a2, a5,  -8
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:265:9
    |
265 |         s32e    a3, a5,  -4
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:6:9
    |
6   |         s32e    a3, a5,  -4
    |         ^^^^

error: invalid instruction mnemonic 'rfwo'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:266:9
    |
266 |         rfwo
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:7:9
    |
7   |         rfwo
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:278:9
    |
278 |         l32e    a0, a5, -16
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:3:9
    |
3   |         l32e    a0, a5, -16
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:279:9
    |
279 |         l32e    a1, a5, -12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:4:9
    |
4   |         l32e    a1, a5, -12
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:280:9
    |
280 |         l32e    a2, a5,  -8
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:5:9
    |
5   |         l32e    a2, a5,  -8
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:281:9
    |
281 |         l32e    a3, a5,  -4
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:6:9
    |
6   |         l32e    a3, a5,  -4
    |         ^^^^

error: invalid instruction mnemonic 'rfwu'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:282:9
    |
282 |         rfwu
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:7:9
    |
7   |         rfwu
    |         ^^^^

error: invalid instruction mnemonic 'rsr'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:289:9
    |
289 |         rsr     a0, WINDOWBASE  // grab WINDOWBASE before rotw changes it
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:14:9
    |
14  |         rsr     a0, WINDOWBASE  // grab WINDOWBASE before rotw changes it
    |         ^^^

error: invalid instruction mnemonic 'rotw'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:290:9
    |
290 |         rotw    -1              // WINDOWBASE goes to a4, new a0-a3 are scratch
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:15:9
    |
15  |         rotw    -1              // WINDOWBASE goes to a4, new a0-a3 are scratch
    |         ^^^^

error: invalid instruction mnemonic 'rsr'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:291:9
    |
291 |         rsr     a2, PS
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:16:9
    |
16  |         rsr     a2, PS
    |         ^^^

error: invalid instruction mnemonic 'extui'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:292:9
    |
292 |         extui   a3, a2, 8, 4    // XCHAL_PS_OWB_SHIFT, XCHAL_PS_OWB_BITS
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:17:9
    |
17  |         extui   a3, a2, 8, 4    // XCHAL_PS_OWB_SHIFT, XCHAL_PS_OWB_BITS
    |         ^^^^^

error: invalid operand for instruction
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:293:9
    |
293 |         xor     a3, a3, a4      // bits changed from old to current windowbase
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:18:9
    |
18  |         xor     a3, a3, a4      // bits changed from old to current windowbase
    |         ^

error: invalid instruction mnemonic 'rsr'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:294:9
    |
294 |         rsr     a4, EXCSAVE1    // restore original a0 (now in a4)
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:19:9
    |
19  |         rsr     a4, EXCSAVE1    // restore original a0 (now in a4)
    |         ^^^

error: invalid instruction mnemonic 'slli'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:295:9
    |
295 |         slli    a3, a3, 8       // XCHAL_PS_OWB_SHIFT
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:20:9
    |
20  |         slli    a3, a3, 8       // XCHAL_PS_OWB_SHIFT
    |         ^^^^

error: invalid operand for instruction
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:296:9
    |
296 |         xor     a2, a2, a3      // flip changed bits in old window base
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:21:9
    |
21  |         xor     a2, a2, a3      // flip changed bits in old window base
    |         ^

error: invalid instruction mnemonic 'wsr'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:297:9
    |
297 |         wsr     a2, PS          // update PS.OWB to new window base
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:22:9
    |
22  |         wsr     a2, PS          // update PS.OWB to new window base
    |         ^^^

error: invalid instruction mnemonic 'rsync'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:298:9
    |
298 |         rsync
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:23:9
    |
23  |         rsync
    |         ^^^^^

error: invalid instruction mnemonic 'bbci'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:300:9
    |
300 |         bbci    a4, 31, _WindowUnderflow4
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:25:9
    |
25  |         bbci    a4, 31, _WindowUnderflow4
    |         ^^^^

error: invalid instruction mnemonic 'rotw'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:301:9
    |
301 |         rotw    -1              // original a0 goes to a8
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:26:9
    |
26  |         rotw    -1              // original a0 goes to a8
    |         ^^^^

error: invalid instruction mnemonic 'bbci'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:302:9
    |
302 |         bbci    a8, 30, _WindowUnderflow8
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:27:9
    |
27  |         bbci    a8, 30, _WindowUnderflow8
    |         ^^^^

error: invalid instruction mnemonic 'rotw'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:303:9
    |
303 |         rotw    -1
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:28:9
    |
28  |         rotw    -1
    |         ^^^^

error: invalid instruction mnemonic 'j'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:304:9
    |
304 |         j               _WindowUnderflow12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:29:9
    |
29  |         j               _WindowUnderflow12
    |         ^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:316:9
    |
316 |         s32e    a0, a9, -16
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:3:9
    |
3   |         s32e    a0, a9, -16
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:317:9
    |
317 |         l32e    a0, a1, -12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:4:9
    |
4   |         l32e    a0, a1, -12
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:319:9
    |
319 |         s32e    a1, a9, -12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:6:9
    |
6   |         s32e    a1, a9, -12
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:320:9
    |
320 |         s32e    a2, a9,  -8
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:7:9
    |
7   |         s32e    a2, a9,  -8
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:321:9
    |
321 |         s32e    a3, a9,  -4
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:8:9
    |
8   |         s32e    a3, a9,  -4
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:322:9
    |
322 |         s32e    a4, a0, -32
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:9:9
    |
9   |         s32e    a4, a0, -32
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:323:9
    |
323 |         s32e    a5, a0, -28
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:10:9
    |
10  |         s32e    a5, a0, -28
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:324:9
    |
324 |         s32e    a6, a0, -24
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:11:9
    |
11  |         s32e    a6, a0, -24
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:325:9
    |
325 |         s32e    a7, a0, -20
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:12:9
    |
12  |         s32e    a7, a0, -20
    |         ^^^^

error: invalid instruction mnemonic 'rfwo'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:326:9
    |
326 |         rfwo
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:13:9
    |
13  |         rfwo
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:338:9
    |
338 |         l32e    a0, a9, -16
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:3:9
    |
3   |         l32e    a0, a9, -16
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:339:9
    |
339 |         l32e    a1, a9, -12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:4:9
    |
4   |         l32e    a1, a9, -12
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:340:9
    |
340 |         l32e    a2, a9,  -8
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:5:9
    |
5   |         l32e    a2, a9,  -8
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:341:9
    |
341 |         l32e    a7, a1, -12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:6:9
    |
6   |         l32e    a7, a1, -12
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:343:9
    |
343 |         l32e    a3, a9,  -4
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:8:9
    |
8   |         l32e    a3, a9,  -4
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:344:9
    |
344 |         l32e    a4, a7, -32
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:9:9
    |
9   |         l32e    a4, a7, -32
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:345:9
    |
345 |         l32e    a5, a7, -28
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:10:9
    |
10  |         l32e    a5, a7, -28
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:346:9
    |
346 |         l32e    a6, a7, -24
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:11:9
    |
11  |         l32e    a6, a7, -24
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:347:9
    |
347 |         l32e    a7, a7, -20
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:12:9
    |
12  |         l32e    a7, a7, -20
    |         ^^^^

error: invalid instruction mnemonic 'rfwu'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:348:9
    |
348 |         rfwu
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:13:9
    |
13  |         rfwu
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:360:9
    |
360 |         s32e    a0,  a13, -16
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:3:9
    |
3   |         s32e    a0,  a13, -16
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:361:9
    |
361 |         l32e    a0,  a1,  -12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:4:9
    |
4   |         l32e    a0,  a1,  -12
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:363:9
    |
363 |         s32e    a1,  a13, -12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:6:9
    |
6   |         s32e    a1,  a13, -12
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:364:9
    |
364 |         s32e    a2,  a13,  -8
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:7:9
    |
7   |         s32e    a2,  a13,  -8
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:365:9
    |
365 |         s32e    a3,  a13,  -4
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:8:9
    |
8   |         s32e    a3,  a13,  -4
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:366:9
    |
366 |         s32e    a4,  a0,  -48
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:9:9
    |
9   |         s32e    a4,  a0,  -48
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:367:9
    |
367 |         s32e    a5,  a0,  -44
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:10:9
    |
10  |         s32e    a5,  a0,  -44
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:368:9
    |
368 |         s32e    a6,  a0,  -40
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:11:9
    |
11  |         s32e    a6,  a0,  -40
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:369:9
    |
369 |         s32e    a7,  a0,  -36
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:12:9
    |
12  |         s32e    a7,  a0,  -36
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:370:9
    |
370 |         s32e    a8,  a0,  -32
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:13:9
    |
13  |         s32e    a8,  a0,  -32
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:371:9
    |
371 |         s32e    a9,  a0,  -28
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:14:9
    |
14  |         s32e    a9,  a0,  -28
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:372:9
    |
372 |         s32e    a10, a0,  -24
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:15:9
    |
15  |         s32e    a10, a0,  -24
    |         ^^^^

error: invalid instruction mnemonic 's32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:373:9
    |
373 |         s32e    a11, a0,  -20
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:16:9
    |
16  |         s32e    a11, a0,  -20
    |         ^^^^

error: invalid instruction mnemonic 'rfwo'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:374:9
    |
374 |         rfwo
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:17:9
    |
17  |         rfwo
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:386:9
    |
386 |         l32e    a0,  a13, -16
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:3:9
    |
3   |         l32e    a0,  a13, -16
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:387:9
    |
387 |         l32e    a1,  a13, -12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:4:9
    |
4   |         l32e    a1,  a13, -12
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:388:9
    |
388 |         l32e    a2,  a13,  -8
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:5:9
    |
5   |         l32e    a2,  a13,  -8
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:389:9
    |
389 |         l32e    a11, a1,  -12
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:6:9
    |
6   |         l32e    a11, a1,  -12
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:391:9
    |
391 |         l32e    a3,  a13,  -4
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:8:9
    |
8   |         l32e    a3,  a13,  -4
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:392:9
    |
392 |         l32e    a4,  a11, -48
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:9:9
    |
9   |         l32e    a4,  a11, -48
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:393:9
    |
393 |         l32e    a5,  a11, -44
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:10:9
    |
10  |         l32e    a5,  a11, -44
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:394:9
    |
394 |         l32e    a6,  a11, -40
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:11:9
    |
11  |         l32e    a6,  a11, -40
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:395:9
    |
395 |         l32e    a7,  a11, -36
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:12:9
    |
12  |         l32e    a7,  a11, -36
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:396:9
    |
396 |         l32e    a8,  a11, -32
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:13:9
    |
13  |         l32e    a8,  a11, -32
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:397:9
    |
397 |         l32e    a9,  a11, -28
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:14:9
    |
14  |         l32e    a9,  a11, -28
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:398:9
    |
398 |         l32e    a10, a11, -24
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:15:9
    |
15  |         l32e    a10, a11, -24
    |         ^^^^

error: invalid instruction mnemonic 'l32e'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:399:9
    |
399 |         l32e    a11, a11, -20
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:16:9
    |
16  |         l32e    a11, a11, -20
    |         ^^^^

error: invalid instruction mnemonic 'rfwu'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/exception/esp32.rs:400:9
    |
400 |         rfwu
    |         ^
    |
note: instantiated into assembly here
   --> <inline asm>:17:9
    |
17  |         rfwu
    |         ^^^^

error: invalid instruction mnemonic 'wsr.ccompare0'
  --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/lib.rs:98:14
   |
98 |             "wsr.ccompare0 {0}",
   |              ^
   |
note: instantiated into assembly here
  --> <inline asm>:2:2
   |
2  |     wsr.ccompare0 rax
   |     ^^^^^^^^^^^^^

error: invalid instruction mnemonic 'wsr.ccompare1'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/lib.rs:100:14
    |
100 |             "wsr.ccompare1 {0}",
    |              ^
    |
note: instantiated into assembly here
   --> <inline asm>:3:1
    |
3   | wsr.ccompare1 rax
    | ^^^^^^^^^^^^^

error: invalid instruction mnemonic 'wsr.ccompare2'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/lib.rs:102:14
    |
102 |             "wsr.ccompare2 {0}",
    |              ^
    |
note: instantiated into assembly here
   --> <inline asm>:4:1
    |
4   | wsr.ccompare2 rax
    | ^^^^^^^^^^^^^

error: invalid instruction mnemonic 'isync'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/lib.rs:105:14
    |
105 |             "isync",
    |              ^
    |
note: instantiated into assembly here
   --> <inline asm>:5:1
    |
5   | isync
    | ^^^^^

error: invalid instruction mnemonic 'wsr.vecbase'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/xtensa-lx-rt-0.15.0/src/lib.rs:136:11
    |
136 |     asm!("wsr.vecbase {0}", in(reg) base, options(nostack));
    |           ^
    |
note: instantiated into assembly here
   --> <inline asm>:2:2
    |
2   |     wsr.vecbase rdi
    |     ^^^^^^^^^^^

error: could not compile `xtensa-lx-rt` (lib) due to 479 previous errors
error: invalid instruction mnemonic 'rsil'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-hal-common-0.7.1/src/lib.rs:163:35
    |
163 |                 core::arch::asm!("rsil {0}, 5", out(reg) tkn);
    |                                   ^
    |
note: instantiated into assembly here
   --> <inline asm>:2:2
    |
2   |     rsil rax, 5
    |     ^^^^

error: invalid instruction mnemonic 'wsr.ps'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-hal-common-0.7.1/src/lib.rs:181:26
    |
181 |                         "wsr.ps {0}",
    |                          ^
    |
note: instantiated into assembly here
   --> <inline asm>:2:2
    |
2   |     wsr.ps rax
    |     ^^^^^^

error: invalid instruction mnemonic 'rsync'
   --> /home/elbston/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp-hal-common-0.7.1/src/lib.rs:182:26
    |
182 |                         "rsync", in(reg) token)
    |                          ^
    |
note: instantiated into assembly here
   --> <inline asm>:3:1
    |
3   | rsync
    | ^^^^^

error: could not compile `esp-hal-common` (lib) due to 3 previous errors

Not an embedded engineer but this looks to me like you are building for the wrong target. Have you followed the instructions from the esp-rs book on how to setup your project?

This won't help you solve the problem but it might help you understand the errors better:
It's probably the case that the checking of the features happens even before any instructions are emited. That's why the problem with the instructions only happens on nightly, because on stable it doesn't even get that far before it has to stop compiling with the "nightly only feature" error.