Repository navigation
esp-emu 0.50.0
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 withIllegalInstruction. All 217ee.*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-devputs devices on the I2C bus: firmware whose board init talks to an IO expander, touch controller or PMIC used to fail withunexpected nack detectedbeforeapp_main.--i2c-dev PORT:ADDR(repeatable) adds a device that ACKs and reads back what was written;width=2,fill=andreg=REG=VALset the register width, initial contents and preloaded ID bytes. Boots the DFRobot UNIHIKER K10 and Waveshare touch init paths (#30, #5).--elffollows an OTA update:--elftakes 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-bootloaderboots OTA layouts: it used to stop atNo factory app partition foundon tables with onlyota_0/ota_1, or ignoreotadata. It now picks the app the IDF bootloader would, honouringotadataand falling back throughfactory,ota_0, the remaining slots andtest(#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 (--romwith the rev0 ROM plus atools/make-efuse.py --chip-rev 1.0blob) or rebuild withCONFIG_ESP32P4_SELECTS_REV_LESS_V3=n. See README "Chip Revision" (#28). tools/make-efuse.pycovers ESP32-S3: S3 projects built withCONFIG_ESP32S3_REV_MIN_1/_2stopped atchip revision check failed. Required >= v0.2, found v0.0;make-efuse.py --chip esp32s3 --chip-rev 0.2builds 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 thatsinf,expfandpowfuse 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/_getand their_enhancedvariants stopped the firmware with aLoad access faultright afteresp_bt_controller_enable. Set now returnsESP_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 12and 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
floatis pinned to its core, as on a board.floatinside an ISR now panics throughvPortCoprocUsedInISRinstead 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
LoadStoreErrorwhere 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 raiseLoadProhibited/StoreProhibited, byte and halfword access to instruction memory raisesLoadStoreError, 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 erroron 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
fetestexceptreports 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