From ac143b463bb20cec30f5d8b4cd6ce0610ab35862 Mon Sep 17 00:00:00 2001 From: Markus Sattler Date: Tue, 1 Dec 2015 17:13:00 +0100 Subject: [PATCH 1/2] improve docs see #1120 --- doc/ota_updates/ota_updates.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/ota_updates/ota_updates.md b/doc/ota_updates/ota_updates.md index 8071a2303..d0fdf50a3 100644 --- a/doc/ota_updates/ota_updates.md +++ b/doc/ota_updates/ota_updates.md @@ -79,7 +79,13 @@ void onError(OTA_CALLBACK_ERROR (fn)); ### Basic Requirements -- Flash chip size is 2x the size of the sketch. +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. +keep in mind that the File system and EEPROM for example needs space too (one time) see [flash layout](https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#flash-layout). +```cpp +ESP.getFreeSketchSpace(); +``` +can be used for checking the free space for the new sketch. + The following chapters provide more details and specific methods of doing OTA. @@ -318,7 +324,7 @@ Example header data: [HTTP_X_ESP8266_AP_MAC] => 1A:FE:AA:AA:AA:AA [HTTP_X_ESP8266_FREE_SPACE] => 671744 [HTTP_X_ESP8266_SKETCH_SIZE] => 373940 - [HTTP_X_ESP8266_CHIP_SIZE] => 524288 + [HTTP_X_ESP8266_CHIP_SIZE] => 4194304 [HTTP_X_ESP8266_SDK_VERSION] => 1.3.0 [HTTP_X_ESP8266_VERSION] => DOOR-7-g14f53a19 ``` From 6a9f044f873fa0e0cf6655127f593dfc55ac5c4c Mon Sep 17 00:00:00 2001 From: Markus Sattler Date: Tue, 1 Dec 2015 17:26:45 +0100 Subject: [PATCH 2/2] relative link --- doc/ota_updates/ota_updates.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/ota_updates/ota_updates.md b/doc/ota_updates/ota_updates.md index d0fdf50a3..42bcb06ac 100644 --- a/doc/ota_updates/ota_updates.md +++ b/doc/ota_updates/ota_updates.md @@ -80,7 +80,7 @@ void onError(OTA_CALLBACK_ERROR (fn)); ### Basic Requirements 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. -keep in mind that the File system and EEPROM for example needs space too (one time) see [flash layout](https://github.com/esp8266/Arduino/blob/master/doc/filesystem.md#flash-layout). +keep in mind that the File system and EEPROM for example needs space too (one time) see [flash layout](../filesystem.md#flash-layout). ```cpp ESP.getFreeSketchSpace(); ```