Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By martinayotte
#34297 I don't know about RTOS, but it ArduinoESP, the location of SPIFFS is defined in the LD script, in the case of 512K/64K :
Code: Select allPROVIDE ( _SPIFFS_start = 0x4026B000 );
PROVIDE ( _SPIFFS_end = 0x4027B000 );
PROVIDE ( _SPIFFS_page = 0x100 );
PROVIDE ( _SPIFFS_block = 0x1000 );
User avatar
By andres
#53962 Hi to all ... :) ,
Me too is trying to use SD card and Spiffs together ... I use IDE 1.6.5 and 2.3.0 Board Manager on a Windows Machine. The 2 examples SDWebserver & FSBrowser works fine if used alone but ... for example, if I put this 2 lines "#include <SPI.h> #include <SD.h>" in sketch "FSBrowser.ino" I got this errors :

Code: Select allArduino:1.6.5 (Windows 8.1), Scheda:"Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 512K (128K SPIFFS), ck, Disabled, None"

Opzioni di compilazione cambiate, ricompilo tutto

Uso la libreria ESP8266WiFi nella cartella: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi

Uso la libreria ESP8266WebServer nella cartella: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer

Uso la libreria ESP8266mDNS nella cartella: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266mDNS (legacy)

Uso la libreria SPI nella cartella: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SPI

Uso la libreria SD(esp8266) nella cartella: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SD



C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/include -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/lwip/include -IC:\Users\Internet\AppData\Local\Temp\build2582882382906430792.tmp/core -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10605 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_ESP01" -DESP8266 -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266 -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\variants\generic -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266mDNS -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SPI -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SD\src C:\Users\Internet\AppData\Local\Temp\build2582882382906430792.tmp\FSBrowser.cpp -o C:\Users\Internet\AppData\Local\Temp\build2582882382906430792.tmp\FSBrowser.cpp.o

In file included from FSBrowser.ino:31:0:
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SD\src/SD.h:26:7: error: redefinition of 'class fs::File'
 class File : public Stream {
       ^
In file included from FSBrowser.ino:29:0:
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:48:7: error: previous definition of 'class fs::File'
 class File : public Stream
       ^
Multiple libraries were found for "SD.h"

 Used: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SD

 Not used: C:\Program Files (x86)\Arduino\libraries\SD

Errore durante la compilazione


Otherwise ... If I put "#include <FS.h>" in "SDWebserver.ino" I got :

Code: Select allArduino:1.6.5 (Windows 8.1), Scheda:"Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 512K (128K SPIFFS), ck, Disabled, None"

Opzioni di compilazione cambiate, ricompilo tutto

Uso la libreria ESP8266WiFi nella cartella: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi

Uso la libreria ESP8266WebServer nella cartella: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer

Uso la libreria ESP8266mDNS nella cartella: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266mDNS (legacy)

Uso la libreria SPI nella cartella: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SPI

Uso la libreria SD(esp8266) nella cartella: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SD



C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\tools\xtensa-lx106-elf-gcc\1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-g++ -D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/include -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0/tools/sdk/lwip/include -IC:\Users\Internet\AppData\Local\Temp\build7558449930015764819.tmp/core -c -w -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections -DF_CPU=80000000L -DLWIP_OPEN_SRC -DARDUINO=10605 -DARDUINO_ESP8266_ESP01 -DARDUINO_ARCH_ESP8266 -DARDUINO_BOARD="ESP8266_ESP01" -DESP8266 -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266 -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\variants\generic -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WiFi\src -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266WebServer\src -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\ESP8266mDNS -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SPI -IC:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SD\src C:\Users\Internet\AppData\Local\Temp\build7558449930015764819.tmp\SDWebServer.cpp -o C:\Users\Internet\AppData\Local\Temp\build7558449930015764819.tmp\SDWebServer.cpp.o

In file included from SDWebServer.ino:36:0:
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:133:11: error: 'File' is already declared in this scope
 using fs::File;
           ^
SDWebServer.ino: In function 'bool loadFromSdCard(String)':
SDWebServer.ino:74:39: error: conversion from 'File' to non-scalar type 'fs::File' requested
SDWebServer.ino:75:15: error: 'class fs::File' has no member named 'isDirectory'
SDWebServer.ino:78:14: error: no match for 'operator=' (operand types are 'fs::File' and 'File')
SDWebServer.ino:78:14: note: candidates are:
In file included from SDWebServer.ino:36:0:
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:48:7: note: fs::File& fs::File::operator=(const fs::File&)
 class File : public Stream
       ^
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:48:7: note:   no known conversion for argument 1 from 'File' to 'const fs::File&'
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:48:7: note: fs::File& fs::File::operator=(fs::File&&)
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:48:7: note:   no known conversion for argument 1 from 'File' to 'fs::File&&'
SDWebServer.ino: In function 'void handleFileUpload()':
SDWebServer.ino:99:16: error: no match for 'operator=' (operand types are 'fs::File' and 'File')
SDWebServer.ino:99:16: note: candidates are:
In file included from SDWebServer.ino:36:0:
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:48:7: note: fs::File& fs::File::operator=(const fs::File&)
 class File : public Stream
       ^
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:48:7: note:   no known conversion for argument 1 from 'File' to 'const fs::File&'
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:48:7: note: fs::File& fs::File::operator=(fs::File&&)
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:48:7: note:   no known conversion for argument 1 from 'File' to 'fs::File&&'
SDWebServer.ino: In function 'void deleteRecursive(String)':
SDWebServer.ino:111:43: error: conversion from 'File' to non-scalar type 'fs::File' requested
SDWebServer.ino:112:12: error: 'class fs::File' has no member named 'isDirectory'
SDWebServer.ino:118:8: error: 'class fs::File' has no member named 'rewindDirectory'
SDWebServer.ino:120:23: error: 'class fs::File' has no member named 'openNextFile'
SDWebServer.ino:123:14: error: 'class fs::File' has no member named 'isDirectory'
SDWebServer.ino: In function 'void handleCreate()':
SDWebServer.ino:157:57: error: conversion from 'File' to non-scalar type 'fs::File' requested
SDWebServer.ino:159:33: error: invalid conversion from 'const char*' to 'uint8_t {aka unsigned char}' [-fpermissive]
In file included from SDWebServer.ino:36:0:
C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\cores\esp8266/FS.h:54:12: error:   initializing argument 1 of 'virtual size_t fs::File::write(uint8_t)' [-fpermissive]
     size_t write(uint8_t) override;
            ^
SDWebServer.ino: In function 'void printDirectory()':
SDWebServer.ino:172:42: error: conversion from 'File' to non-scalar type 'fs::File' requested
SDWebServer.ino:174:11: error: 'class fs::File' has no member named 'isDirectory'
SDWebServer.ino:178:7: error: 'class fs::File' has no member named 'rewindDirectory'
SDWebServer.ino:185:22: error: 'class fs::File' has no member named 'openNextFile'
SDWebServer.ino:194:22: error: 'class fs::File' has no member named 'isDirectory'
Multiple libraries were found for "SD.h"

 Used: C:\Users\Internet\AppData\Roaming\Arduino15\packages\esp8266\hardware\esp8266\2.3.0\libraries\SD

 Not used: C:\Program Files (x86)\Arduino\libraries\SD

conversion from 'File' to non-scalar type 'fs::File' requested


??? :shock:
User avatar
By andres
#54266 Yesss... :D ,

Thanks to Your reply Martinayotte, This was the problem ...
But I had to change also "File.cpp" & "SD.cpp" with the same substitution in order to compile correctly.

Now I go further with my tests on the merged FSBrowser & SDWebServer sketch ... :)