Skip to content

Commit 9b13040

Browse files
committed
Merge pull request esp8266#1125 from Links2004/master
improve docs
2 parents 1ac18e1 + 6a9f044 commit 9b13040

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

doc/ota_updates/ota_updates.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,13 @@ void onError(OTA_CALLBACK_ERROR (fn));
7979

8080
### Basic Requirements
8181

82-
- Flash chip size is 2x the size of the sketch.
82+
Flash chip size needs a size thats is able to hold the old sketch (currently running) and the new sketch (OTA) at the same time.
83+
keep in mind that the File system and EEPROM for example needs space too (one time) see [flash layout](../filesystem.md#flash-layout).
84+
```cpp
85+
ESP.getFreeSketchSpace();
86+
```
87+
can be used for checking the free space for the new sketch.
88+
8389

8490

8591
The following chapters provide more details and specific methods of doing OTA.
@@ -318,7 +324,7 @@ Example header data:
318324
[HTTP_X_ESP8266_AP_MAC] => 1A:FE:AA:AA:AA:AA
319325
[HTTP_X_ESP8266_FREE_SPACE] => 671744
320326
[HTTP_X_ESP8266_SKETCH_SIZE] => 373940
321-
[HTTP_X_ESP8266_CHIP_SIZE] => 524288
327+
[HTTP_X_ESP8266_CHIP_SIZE] => 4194304
322328
[HTTP_X_ESP8266_SDK_VERSION] => 1.3.0
323329
[HTTP_X_ESP8266_VERSION] => DOOR-7-g14f53a19
324330
```

0 commit comments

Comments
 (0)