Skip to content

Commit

Permalink
Additional notes for choosing the appropriate OTA partition
Browse files Browse the repository at this point in the history
  • Loading branch information
Hieromon committed Feb 3, 2022
1 parent fe4e3b7 commit 394767a
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions examples/WebCamServer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,24 @@ const uint16_t _cameraServerPort = 3000; // Default is 3000.
ESP32WebCam webcam(_cameraServerPort);
```
- Make sure to specify the correct partition table to be available OTA. The default partition table as [`huge_app.csv`](https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/huge_app.csv) for the Ai-Thinker ESP32-CAM board selected in the Board Manager of the Arduino IDE does not reserve any OTA space. `WebCamServer.ino` configures the menu with AutoConnectOTA enabled, but OTA will fail with the default *huge_app* partition configured. As a pre-configured partition table with OTA enabled, [`min_spiffs.csv`](https://github.com/espressif/arduino-esp32/blob/master/tools/partitions/min_spiffs.csv) is available for `WebCamServer.ino`.
To make the *min_spiffs* partition available using the Arduino IDE with Ai-Thinker ESP32-CAM, you need to edit the [`boards.txt`](https://github.com/espressif/arduino-esp32/blob/3a96fc0e4a166a9221f4a4ab259747d484f19499/boards.txt#L8042) file. In your environment, open the `boards.txt` file and insert the following few lines to the `AI Thinker ESP32-CAM` section, and you will be able to select the partitions from Arduino IDE's `Tool` menu.
```ini
esp32cam.menu.PartitionScheme.default=Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
esp32cam.menu.PartitionScheme.default.build.partitions=default
esp32cam.menu.PartitionScheme.huge_app=Huge APP (3MB No OTA/1MB SPIFFS)
esp32cam.menu.PartitionScheme.huge_app.build.partitions=huge_app
esp32cam.menu.PartitionScheme.huge_app.upload.maximum_size=3145728
esp32cam.menu.PartitionScheme.min_spiffs=Minimal SPIFFS (1.9MB APP with OTA/190KB SPIFFS)
esp32cam.menu.PartitionScheme.min_spiffs.build.partitions=min_spiffs
esp32cam.menu.PartitionScheme.min_spiffs.upload.maximum_size=1966080
```

- PlatformIO allows you to specify the *min_spiffs* partition in a concise manner. Just add the following line to the build configuration in the `platformio.ini` file. For more information about the `board_build.partitions` directive, please refer to the [PlatformIO documentation](https://docs.platformio.org/en/latest/platforms/espressif32.html?highlight=board_build%20partitions#partition-tables).

```ini
board_build.partitions = min_spiffs.csv
```

A detailed how to for this example sketch is provided in the [AutoConnect documentation](https://hieromon.github.io/AutoConnect/esp32cam.html).

0 comments on commit 394767a

Please sign in to comment.