File tree Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Expand file tree Collapse file tree 2 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,14 @@ bool UpdaterClass::begin(size_t size, int command) {
57
57
return false ;
58
58
}
59
59
60
+ if (ESP.getFlashChipRealSize () != ESP.getFlashChipSize ()) {
61
+ _error = UPDATE_ERROR_FLASH_CONFIG;
62
+ #ifdef DEBUG_UPDATER
63
+ printError (DEBUG_UPDATER);
64
+ #endif
65
+ return false ;
66
+ }
67
+
60
68
_reset ();
61
69
_error = 0 ;
62
70
@@ -278,6 +286,8 @@ void UpdaterClass::printError(Stream &out){
278
286
out.println (" Stream Read Timeout" );
279
287
} else if (_error == UPDATE_ERROR_MD5){
280
288
out.println (" MD5 Check Failed" );
289
+ } else if (_error == UPDATE_ERROR_FLASH_CONFIG){
290
+ out.printf (" Flash config wrong real: %d IDE: %d\n " , ESP.getFlashChipRealSize (), ESP.getFlashChipSize ());
281
291
} else {
282
292
out.println (" UNKNOWN" );
283
293
}
Original file line number Diff line number Diff line change 5
5
#include " flash_utils.h"
6
6
#include " MD5Builder.h"
7
7
8
- #define UPDATE_ERROR_OK 0
9
- #define UPDATE_ERROR_WRITE 1
10
- #define UPDATE_ERROR_ERASE 2
11
- #define UPDATE_ERROR_SPACE 3
12
- #define UPDATE_ERROR_SIZE 4
13
- #define UPDATE_ERROR_STREAM 5
14
- #define UPDATE_ERROR_MD5 6
8
+ #define UPDATE_ERROR_OK (0 )
9
+ #define UPDATE_ERROR_WRITE (1 )
10
+ #define UPDATE_ERROR_ERASE (2 )
11
+ #define UPDATE_ERROR_SPACE (3 )
12
+ #define UPDATE_ERROR_SIZE (4 )
13
+ #define UPDATE_ERROR_STREAM (5 )
14
+ #define UPDATE_ERROR_MD5 (6 )
15
+ #define UPDATE_ERROR_FLASH_CONFIG (7 )
16
+
15
17
16
18
#define U_FLASH 0
17
19
#define U_SPIFFS 100
You can’t perform that action at this time.
0 commit comments