mirror of
https://github.com/rstrouse/ESPSomfy-RTS.git
synced 2026-02-17 12:12:11 +01:00
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
This commit is contained in:
parent
4df4fc87d2
commit
7d635cedd0
2 changed files with 118 additions and 0 deletions
91
FIRMWARE_UPLOAD.md
Normal file
91
FIRMWARE_UPLOAD.md
Normal file
|
|
@ -0,0 +1,91 @@
|
||||||
|
# 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`**:
|
||||||
|
```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 TASKS** → **esp32-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
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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
|
||||||
|
|
||||||
|
```bash
|
||||||
|
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
|
||||||
27
platformio.ini
Normal file
27
platformio.ini
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
[env:esp32-s3-devkitc-1]
|
||||||
|
platform = espressif32
|
||||||
|
board = esp32-s3-devkitc-1
|
||||||
|
framework = arduino
|
||||||
|
monitor_speed = 115200
|
||||||
|
upload_speed = 921600
|
||||||
|
|
||||||
|
; Partition scheme with LittleFS
|
||||||
|
board_build.partitions = default.csv
|
||||||
|
board_build.filesystem = littlefs
|
||||||
|
|
||||||
|
; Required libraries
|
||||||
|
lib_deps =
|
||||||
|
bblanchon/ArduinoJson@^6.21.3
|
||||||
|
https://github.com/LSatan/SmartRC-CC1101-Driver-Lib.git
|
||||||
|
knolleary/PubSubClient@^2.8
|
||||||
|
links2004/WebSockets@^2.4.1
|
||||||
|
|
||||||
|
; Build options
|
||||||
|
build_flags =
|
||||||
|
-DCORE_DEBUG_LEVEL=3
|
||||||
|
|
||||||
|
; Serial port (adjust according to your system)
|
||||||
|
upload_port = /dev/cu.usbmodem101 ; macOS - ESP32-S3 detected
|
||||||
|
monitor_port = /dev/cu.usbmodem101
|
||||||
|
; upload_port = COM3 ; Windows
|
||||||
|
; upload_port = /dev/ttyUSB0 ; Linux
|
||||||
Loading…
Add table
Add a link
Reference in a new issue