Skip to content

esp-emu 0.50.0

Choose a tag to compare

@mahavirj mahavirj released this 20 Oct 14:08
· 21 commits to main since this release
1ae636a

Added

  • ESP32-S3 SIMD (ee.*) instructions: firmware that uses the S3's vector instructions (esp-nn, esp-dsp, esp-dl, ESP-SR) no longer stops with IllegalInstruction. All 217 ee.* instructions are modelled, including ESP-IDF's lazy save of the vector state between tasks, and match ESP32-S3 silicon in a 6624-case differential test; esp-nn's S3 test app passes all 524 cases.
  • --i2c-dev puts devices on the I2C bus: firmware whose board init talks to an IO expander, touch controller or PMIC used to fail with unexpected nack detected before app_main. --i2c-dev PORT:ADDR (repeatable) adds a device that ACKs and reads back what was written; width=2, fill= and reg=REG=VAL set the register width, initial contents and preloaded ID bytes. Boots the DFRobot UNIHIKER K10 and Waveshare touch init paths (#30, #5).
  • --elf follows an OTA update: --elf takes several ELFs and at every boot uses the one matching the running app, so BLE and panic intercepts stay correct across an OTA reboot. An ELF from a different build is skipped with a warning naming the project and version actually running (#22).
  • --skip-bootloader boots OTA layouts: it used to stop at No factory app partition found on tables with only ota_0/ota_1, or ignore otadata. It now picks the app the IDF bootloader would, honouring otadata and falling back through factory, ota_0, the remaining slots and test (#29).
  • ESP32-P4 images built for rev 0.x/1.x silicon are refused up front: ESP-IDF v5.4 and v5.5 (up to v5.5.2) build P4 firmware for pre-v3 silicon by default, which died in the bootloader with Guru Meditation Error ... (Load access fault) on the emulated rev v3.1 chip. The emulator now stops at startup and names the two fixes: run as pre-v3 silicon (--rom with the rev0 ROM plus a tools/make-efuse.py --chip-rev 1.0 blob) or rebuild with CONFIG_ESP32P4_SELECTS_REV_LESS_V3=n. See README "Chip Revision" (#28).
  • tools/make-efuse.py covers ESP32-S3: S3 projects built with CONFIG_ESP32S3_REV_MIN_1/_2 stopped at chip revision check failed. Required >= v0.2, found v0.0; make-efuse.py --chip esp32s3 --chip-rev 0.2 builds the blob that boots them.

Changed

  • Fused multiply-add on ESP32-P4 and S31 runs about 3× faster: the single-precision fused ops GCC emits at -O2/-Os, and that sinf, expf and powf use throughout, now take the direct host path with identical results and flags.

Fixed

  • ESP32-C3 / ESP32-S3 BLE TX power API no longer crashes: esp_ble_tx_power_set/_get and their _enhanced variants stopped the firmware with a Load access fault right after esp_bt_controller_enable. Set now returns ESP_OK; get returns level 0, since the emulator keeps no TX power state (#31).
  • ESP32-P4 PSRAM window follows the PSRAM MMU: firmware that remaps the external-RAM window at runtime (a loader staging a payload at a PSRAM page of its choosing) no longer reads zeros and traps on Illegal instruction 0x00000000. Stock ESP-IDF runs as before at the same speed (#24).
  • BLE could fail to sync with NimBLE: a second HCI event could be delivered while the first was still being handled, so NimBLE logged HCI process ack returned 12 and advertising never started; seen on ESP32-S3 under IDF v6.1. Events now wait for the previous one to finish.
  • Floating point on ESP32-P4 and S31 now traps while the FPU is off, as on silicon, so FreeRTOS saves FP registers lazily per task and a task using float is pinned to its core, as on a board. float inside an ISR now panics through vPortCoprocUsedInISR instead of running.
  • ESP32-S3 loads and stores outside ordinary memory behave as on a board: a stray pointer into an unmapped region no longer stops the emulator with LoadStoreError where a board keeps running; an M5Stack CoreS3 product that walks junk display init commands now boots. As measured on a CoreS3: NULL and garbage pointers raise LoadProhibited/StoreProhibited, byte and halfword access to instruction memory raises LoadStoreError, unmapped addresses read 0 and drop writes (logged once per location), and an access straddling two regions is answered per half. A read through an invalid flash MMU entry (Cache error on silicon) is not modelled. RISC-V chips are unchanged.
  • Floating-point exception flags on ESP32-P4 and S31: results at the smallest-normal and largest-finite boundaries now raise underflow and overflow as the chips do, checked against 2180 results measured on both boards, so fetestexcept reports what a board reports.
  • ESP32-S31 interrupts that share a CPU interrupt: an interrupt source numbered 128 or higher (LP watchdog, LP access-permission monitors, HUK) sharing a CPU interrupt could lower the line while another source still held it, losing that interrupt. A shared interrupt now stays raised while any of its sources is.

Installable via:

curl -fsSL https://raw.githubusercontent.com/espressif/esp-emulator/main/install.sh | sh

Or from an existing install:

esp-emu update