ESPSomfy-RTS/FIRMWARE_UPLOAD.md
Anthony Marchand 7d635cedd0 docs: add firmware upload guide and translate platformio.ini comments
- Add FIRMWARE_UPLOAD.md with PlatformIO upload instructions
- Translate platformio.ini comments to English
- Remove redundant comments from platformio.ini
2026-01-29 00:45:58 +01:00

2.4 KiB

Upload Guide from Cursor

Installing PlatformIO

  1. Install PlatformIO extension in Cursor:

    • Open extensions (Cmd+Shift+X / Ctrl+Shift+X)
    • Search for "PlatformIO IDE"
    • Install the official extension
  2. Wait for installation:

    • PlatformIO will automatically install necessary tools
    • This may take a few minutes the first time

Serial Port Configuration

  1. Connect your ESP32-S3 via USB

  2. Identify the port:

    • macOS: /dev/cu.usbserial-* or /dev/cu.usbmodem*
    • Windows: COM3, COM4, etc.
    • Linux: /dev/ttyUSB0 or /dev/ttyACM0
  3. Uncomment and modify the line in platformio.ini:

    upload_port = /dev/cu.usbserial-XXXX  ; Replace with your port
    

Firmware Upload

Method 1: Via PlatformIO Toolbar

  1. Click on the PlatformIO icon in the left sidebar
  2. In PROJECT TASKSesp32-s3-devkitc-1
  3. Click Upload (or Build and Upload)

Method 2: Via Command Palette

  1. Open command palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Type "PlatformIO: Upload"
  3. Select the esp32-s3-devkitc-1 environment

Method 3: Via Integrated Terminal

pio run --target upload

LittleFS Filesystem Upload

IMPORTANT: After uploading the firmware, you must also upload the files from the data/ folder (index.html, index.js, etc.)

Via Command Palette

  1. Command palette (Cmd+Shift+P / Ctrl+Shift+P)
  2. Type "PlatformIO: Upload Filesystem Image"
  3. Select the esp32-s3-devkitc-1 environment

Via Terminal

pio run --target uploadfs

Verification

  1. Open serial monitor:

    • Command palette → "PlatformIO: Serial Monitor"
    • Or PlatformIO icon → Monitor
  2. Check messages:

    • You should see "Startup/Boot...."
    • And "File system mounted successfully"
  3. Connect to web interface:

    • Look for IP address in serial logs
    • Or connect to WiFi "ESPSomfy RTS" if in AP mode

Troubleshooting

"Port not found" Error

  • Verify ESP32 is properly connected
  • Check port in platformio.ini
  • On macOS/Linux, you may need permissions: sudo chmod 666 /dev/cu.usbserial-*

Compilation Error

  • Verify all libraries are installed
  • PlatformIO installs them automatically, but you can force: pio lib install

Filesystem Won't Upload

  • Make sure firmware was uploaded first
  • Verify the data/ folder exists
  • Some boards require manual reset before filesystem upload