-->
Page 1 of 2

Compile error when SDFat library used

PostPosted: Fri Jun 19, 2020 10:42 am
by THNDR
Hello,

I'm trying to add an SD card to my project using the ESP8266SdFat library as I would like to use the software spi. I tried it in my program first and then after I encountered the error I'm trying to just get one of the examples to compile, but I always get the following error, datalogger.ino example:

Code: Select allIn file included from C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdCard/../SpiDriver/SoftSPI.h:36:0,
                 from C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdCard/../SpiDriver/SdSpiDriver.h:277,
                 from C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdCard/SdSpiCard.h:35,
                 from C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/BlockDriver.h:32,
                 from C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdFat.h:32,
                 from C:\Users\mssuc\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\examples\dataLogger\dataLogger.ino:5:
C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdCard/../SpiDriver/DigitalPin.h: In function 'void fastDigitalToggle(uint8_t)':
C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdCard/../SpiDriver/DigitalPin.h:286:45: error: 'fastDigitalRead' was not declared in this scope
   fastDigitalWrite(pin, !fastDigitalRead(pin));
                                             ^
C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdCard/../SpiDriver/DigitalPin.h:286:45: note: suggested alternative:
C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdCard/../SpiDriver/DigitalPin.h:263:6: note:   'sdfat::fastDigitalRead'
 bool fastDigitalRead(uint8_t pin) {
      ^
C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdCard/../SpiDriver/DigitalPin.h:286:46: error: 'fastDigitalWrite' was not declared in this scope
   fastDigitalWrite(pin, !fastDigitalRead(pin));
                                              ^
C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdCard/../SpiDriver/DigitalPin.h:286:46: note: suggested alternative:
C:\Users\mssuc\AppData\Local\arduino15\packages\esp8266\hardware\esp8266\2.7.1\libraries\ESP8266SdFat\src/SdCard/../SpiDriver/DigitalPin.h:242:6: note:   'sdfat::fastDigitalWrite'
 void fastDigitalWrite(uint8_t pin, uint8_t val) {
      ^
exit status 1
Error compiling for board Generic ESP8266 Module.


I have upgraded arduino, esp8266 and visual micro to the latest version but no change in the error in either IDE. I have not been able to find any other post about this and am at a loss on how to correct. Any help would be greatly appreciated.
Thanks

Re: Compile error when SDFat library used

PostPosted: Fri Jun 19, 2020 11:40 am
by RichardS
Is there a library the SD lib is dependent on that is not included?

RichardS

Re: Compile error when SDFat library used

PostPosted: Sat Jun 20, 2020 6:51 pm
by THNDR
I don't believe to. The calling function and the function being called are in the same library. From what understand due to conflicts with other file systems, name spaces are used and the called functions are within the declared namespace. I've looked in the library and it seems to be good. I'm not sure if the problem in the library or since it appears to be working for others, a problem with the setup on my computer. I've reinstalled the Arduino IDE but that has not made a difference. Would there be any other suggestions to try?

Re: Compile error when SDFat library used

PostPosted: Sun Jun 21, 2020 1:21 pm
by JurajA
Code: Select allusing library SPI at version 1.0 in folder: /home/duro/.arduino15/packages/esp8266/hardware/esp8266/2.7.1/libraries/SPI
Using library ESP8266SdFat at version 1.1.0 in folder: /home/duro/.arduino15/packages/esp8266/hardware/esp8266/2.7.1/libraries/ESP8266SdFat
/home/duro/.arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/xtensa-lx106-elf-size -A /tmp/arduino_build_268559/dataLogger.ino.elf
Sketch uses 263608 bytes (25%) of program storage space. Maximum is 1044464 bytes.
Global variables use 27532 bytes (33%) of dynamic memory, leaving 54388 bytes for local variables. Maximum is 81920 bytes.


no problem here. did you change something in the dataLogger example?