# HIL Test Environment: ESP32 Device Mapping This document defines the persistent hardware mapping for the ASF-SH Debugger environment. Devices are mapped via **udev rules** to ensure `/dev/` paths remain constant regardless of plug order. ## Setup 1: Debugging & Programming | Device Name | Friendly Symlink | Environment Variable | Hardware ID / Serial | | :--- | :--- | :--- | :--- | | **EPROG Debugger** | `/dev/eprog_debugger` | `$EPROG` | FTDI Dual RS232 (Port 0) | | **ESP32-S3 Target** | `/dev/esp32_s3_debug` | `$ESP_DEBUG` | Serial: `123456` | ## Setup 2: I2C & Sensor Emulation | Device Name | Friendly Symlink | Environment Variable | Hardware ID / Serial | | :--- | :--- | :--- | :--- | | **ESP Sensor Test** | `/dev/esp_sensor_test` | `$ESP_SENSOR` | ID: `1a86:7523` | | **I2C Emulator** | `/dev/i2c_emulator` | `$I2C_EMULATOR` | CP2102 Serial: `0001` | ## Usage in Scripts Always use the environment variables in your automation scripts to ensure compatibility: - **Flash Sensor:** `idf.py flash -p $ESP_SENSOR` - **Monitor Emulator:** `idf.py monitor -p $I2C_EMULATOR`