SdFat-Particle icon indicating copy to clipboard operation
SdFat-Particle copied to clipboard

SoftSPI.h: No such file or directory

Open simarmol opened this issue 8 years ago • 3 comments

Veryfing code using this library in Particle Build fails with this error:

SdFat/SdSpi.h:244:21: fatal error: SoftSPI.h: No such file or directory
 #include "SoftSPI.h"
                     ^

simarmol avatar Mar 02 '17 02:03 simarmol

I too am seeing this in particle Library 2.0

Flash device failed. In file included from lib/SdFat/src/SdSpiCard.h:29:0, from lib/SdFat/src/SdFat.h:30, from /src/sd.cpp:1: lib/SdFat/src/SdSpi.h:244:21: fatal error: SoftSPI.h: No such file or directory #include "SoftSPI.h"

looks like the file might have been renamed to SoftSPIParticle.h /home/User/Particle/community/libraries/[email protected]/src/SdFat/SoftSPIParticle.h /home/User/Particle/community/libraries/[email protected]/src/SoftSPIParticle.h

tmiles-milovi avatar Mar 02 '17 04:03 tmiles-milovi

SoftSPI.h is for Arduino boards. Particle now defines the symbol ARDUINO so the include for SoftSPI.h is used.

I plan only limited support for SdFat on Particle so I will likely remove the Software SPI option.

The Particle build site is not working right now so I don't want to waste time.

Try editing SdSpi.h at about line 243 and change this:

#ifdef ARDUINO
#include "SoftSPI.h"
#elif defined(PLATFORM_ID)  // Only defined if a Particle device
#include "SoftSPIParticle.h"
#endif  // ARDUINO

to this:

#include "SoftSPIParticle.h"

greiman avatar Mar 02 '17 15:03 greiman

I finally got the IDE to work and uploaded a mod that seems to fix the missing SoftSPI.h problem.

greiman avatar Mar 02 '17 17:03 greiman