From 35a4e9db734a66ceb551cca1355f562974a8bd1b Mon Sep 17 00:00:00 2001 From: con-f-use Date: Mon, 15 Aug 2016 02:02:11 +0200 Subject: [PATCH] Handle overhang when verifying flash --- embedded8266/common/commonservices.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/embedded8266/common/commonservices.c b/embedded8266/common/commonservices.c index c8196e2..70adc5a 100644 --- a/embedded8266/common/commonservices.c +++ b/embedded8266/common/commonservices.c @@ -145,11 +145,12 @@ int ICACHE_FLASH_ATTR issue_command(char * buffer, int retsize, char *pusrdata, #ifdef VERIFY_FLASH_WRITE #define VFW_SIZE 128 + printf( "FW%d\r\n", nr ); int jj; uint8_t __attribute__ ((aligned (32))) buf[VFW_SIZE]; for(jj=0; jjdatlen ? datlen%VFW_SIZE : VFW_SIZE ) != 0 ) goto failw; } #endif @@ -201,11 +202,12 @@ int ICACHE_FLASH_ATTR issue_command(char * buffer, int retsize, char *pusrdata, // if( ets_memcmp( buf, buffer, (datlen/4)*4 ) != 0 ) break; // Rather do it in chunks, to avoid allocationg huge buf #define VFW_SIZE 128 + printf( "FW%d\r\n", nr ); int jj; uint8_t __attribute__ ((aligned (32))) buf[VFW_SIZE]; for(jj=0; jjdatlen ? datlen%VFW_SIZE : VFW_SIZE ) != 0 ) goto failfx; } #endif