Skip to content

v0.15.0: dual-core ESP32 sim + Arduino-ESP32 / FreeRTOS bring-up

Choose a tag to compare

@w1ne w1ne released this 24 May 08:29
f154297

Added

  • Dual-Core ESP32 / ESP32-S3 Simulation: Round-robin step loop with PRO_CPU / APP_CPU, PRID register exposing xPortGetCoreID(), cross-core IPI bridge wiring DPORT_CPU_INTR_FROM_CPU_n_REG triggers into the target CPU's INTERRUPT bit so esp_crosscore_int_send_yield lands.
  • Runtime Snapshot Subsystem: Machine::with_secondary_cpu, Machine::{take,apply}_runtime_snapshot, CLI snapshot capture subcommand, WASM apply_runtime_snapshot(bytes) + take_runtime_snapshot(). Cold-boot collapses from 30 s to ~0.5 s in the playground.
  • Arduino-ESP32 / FreeRTOS Bring-Up Thunks (crates/core/src/peripherals/esp32s3/rom_thunks.rs): abort_halt, esp_clk_cpu_freq_240mhz, x_queue_create_mutex_static_echo, x_task_get_current_task_handle, return_pd_true, spi_start_bus_fake, spi_class_begin_transaction (lazy spi_t init with USR_MOSI auto-enable), xQueueGiveMutexRecursive, esp_log_impl_lock, recursive-mutex create stubs, esp_ipc_init/esp_ipc_isr_init no-ops.
  • Loader Auto-Discovery: extract_arduino_esp32_thunks + resolve_symbol_in_elf resolve HardwareSerial / SPI / mutex / log-lock / IPC-init symbols by name from the ELF's .symtab, so installed thunks gate strictly on symbol presence (stripped ELFs that don't import the symbol are untouched).
  • AgentDeck Boot Snapshot Pipeline: Captured post-paint state blob; playground replays the snapshot in ~0.5 s.
  • Unified Demo Registry: BoardConfig-driven fetch-demo-firmware.sh and per-board snapshot blobs.
  • Dual-Core PxList Diagnostic Dump: CLI flag dumps the kernel ready/delayed list state on both cores for diagnosing scheduler regressions.

Changed

  • Xtensa WSR.INTSET Semantics: SR id 226 writes now raise pending IRQ bits in INTERRUPT instead of being silently dropped — required for FreeRTOS portYIELD() software interrupt to fire (crates/core/src/cpu/xtensa_sr.rs).
  • CCOMPARE0 Ack-on-Write: Writes ack bit 6 in INTERRUPT and re-raise if the new compare value is already ≤ CCOUNT, closing the silent-timer case where boot-allocator latency pushed the first compare past CCOUNT (crates/core/src/cpu/xtensa_sr.rs).
  • xTaskGetCurrentTaskHandle: Removed from generic nop_return_zero list — now uses dedicated thunk reading pxCurrentTCB[core] via the PX_CURRENT_TCB_ADDR thread-local seed.
  • Fake spi_t Region: Moved out of the firmware DRAM allocator's reach (0x3FFD_F0000x3FFF_FF00 in SRAM1) to prevent silent overwrite by heap growth.
  • return_pd_true Visibility: Now emits a one-time tracing::warn! on first call so the stub's activation is loud in logs — future regressions where a take should block will be visible instead of silently succeeding.

Fixed

  • IPC-Task Spin / Scheduler-Tick Starvation: Combined fix from WSR.INTSET raising SOFTWARE0 and CCOMPARE0 ack-and-rearm; AgentDeck and reader sketch both progress past xQueueSemaphoreTake into app_main / setup().
  • esp_newlib_locks_init Assertion Failure: xQueueCreateMutexStatic returning 0 now echoes the static-buffer argument so the lock pointer is non-NULL.
  • GxEPD2 / SSD1680 SPI Writes Reach the Panel: SPIClass::beginTransaction lazy init enables USER_REG.USR_MOSI (bit 27) when the sketch never calls SPI.begin() explicitly — reader sketch black-plane bytes 0 → 1,429 non-FF (29% glyph coverage) across 3 full refresh cycles, 19,039 SPI3 transactions.
  • Print::print / Print::write Dispatch: Restored real virtual dispatch so display.print("text") flows Print → Adafruit_GFX::write → drawChar → drawPixel; only HardwareSerial::write and the uart* helpers stay stubbed.
  • Dead Inherent Watchpoint Removed: SystemBus::write_u32/write_u16 inherent watchpoint from #93 never fired (bus dispatch goes through trait impl) — code path removed.
  • mkdocs.yml Drift: repo_url typo (libwired-corelabwired-core); nav entries pointing at nonexistent SUPPORTED_DEVICES.md, verification_audit.md, development/git_flow.md corrected or removed.
  • SECURITY.md: Supported versions table updated to 0.15.x; advisory URL corrected from labwired to labwired-core.
  • Example Lints: Cleared clippy::identity_op, needless_range_loop, doc_overindented_list_items, and unused-variable warnings across sensor labs and firmware demos; gated firmware-f407-demo inline ARM asm behind #[cfg(target_arch = "arm")] so host clippy doesn't choke on it.