esp-rs / esp32-hal

A hardware abstraction layer for the esp32 written in Rust.
Apache License 2.0
192 stars 28 forks source link

ESP32 doesn't boot when using external_ram with opt-level to 0, 1, or 2 #70

Open sepotvin opened 2 years ago

sepotvin commented 2 years ago

Hi,

When using the "external-ram" feature, the board (ESP32) will not boot (infinite watchdog loop) if the opt-level is set to 0, 1, or 2. Setting the opt-level to 3, "s", or "z" will fix the issue. Removing the "external-ram" feature will make the board boot at all optimization levels. The attached project is a minimal example to reproduce the problem. I'm using the rust compiler from esp-rs/rust on the esp-1.57.0.2 branch with the esp-idf on branch release/v4.3

esp32_extram_error.zip

MabezDev commented 2 years ago

Thanks for the report. Which dev board are you using with the esp32?

sepotvin commented 2 years ago

I have tried on two different boards with the same behavior.

I also tried with the latest master branch of ESP-IDF (v5.0-dev-676-g5c33570524) without any changes.