fix: resolve ESP32-S3 runtime crash, match official esp-hal examples

Root causes found and fixed:
- USB OTG init stole the PHY from USB-Serial-JTAG (the only USB on V4)
- executor-thread feature conflicted with esp-hal-embassy's executor
- Linker flags needed -Wl, prefix for GCC-to-LD passthrough
- Missing exception-handler feature on esp-backtrace
- Missing alloc in build-std
- Missing LTO and codegen-units=1 in release profile
- Vext on V4 is active LOW (datasheet correct, Arduino lib was wrong)

Now matches the official esp-hal v0.22.0 examples exactly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Opus 4.6 committed 2026-03-29 20:42:55 -06:00
1 parent b90739d2a2
commit 7d20e3ef97
8 files changed
+58 -70

No files matched your search

+1 -2
View File
@@ -17,7 +17,7 @@ cfg_if::cfg_if! {
use panic_probe as _;
} else if #[cfg(any(feature = "heltec_v3", feature = "heltec_v4"))] {
use esp_backtrace as _;
use esp_println as _; // provides defmt global_logger
use esp_println as _;
}
}
@@ -26,7 +26,6 @@ static RESPONSES: ResponseChannel = ResponseChannel::new();
static STATUS: StatusWatch = StatusWatch::new();
static DISPLAY_COMMANDS: DisplayCommandChannel = DisplayCommandChannel::new();
// Entry point: each platform needs its own executor macro.
cfg_if::cfg_if! {
if #[cfg(feature = "rak_wisblock_4631")] {
#[embassy_executor::main]