File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ Connector to let httpd use the espfs filesystem to serve the files in it.
3030#include "roffsformat.h"
3131
3232// default filesystem base address in flash
33- #define FLASH_FILESYSTEM_BASE_1M (1024 *1024 - 128*1024)
33+ #define FLASH_FILESYSTEM_BASE_1M (512 *1024 - 128*1024)
3434#define FLASH_FILESYSTEM_BASE_2M (1024*1024)
3535
3636// open file structure
@@ -74,8 +74,8 @@ int ICACHE_FLASH_ATTR roffs_mount(uint32_t flashAddress)
7474{
7575 RoFsHeader testHeader ;
7676
77- // base address must be aligned to 4 bytes
78- if ((flashAddress & 3 ) != 0 )
77+ // base address must be non-zero and aligned to 4 bytes
78+ if (flashAddress == 0 || (flashAddress & 3 ) != 0 )
7979 return -1 ;
8080
8181 // get and display the flash ID
@@ -90,6 +90,7 @@ int ICACHE_FLASH_ATTR roffs_mount(uint32_t flashAddress)
9090 return -3 ;
9191
9292 // filesystem is mounted successfully
93+ os_printf ("mount: flash filesystem mounted at %08x\n" , flashAddress );
9394 fsData = flashAddress ;
9495 return 0 ;
9596}
You can’t perform that action at this time.
0 commit comments