Closed sachamarbacher closed 4 years ago
Looks like the Nano 33 BLE board package has a bug for use of fcntl.h
This sketch gives the same error.
#include <fcntl.h>
void setup() {
}
void loop() {
}
SdFat-beta must use this file to avoid problems with other boards. You can try editing SdFat/src/SdFatConfig.h to not use fcntl.h.
At about line 195 set USE_FCNTL_H to zero like this.
#elif defined(__arm__)
// ARM gcc defines open flags.
#define USE_FCNTL_H 0 // <<-- was 1
#elif defined(ESP32)
This seems to eliminate the compile error but may cause other problems. I don't have a Nano 33 BLE to test.
Hi Greiman
Thank you very much! I just Updated the SdFatConfig.h file like you told and now the example works perfect.
Greetings Sacha
I encountered the same error on a Nano 33 BLE Sense. Found this, which solved the compile problem for me:
https://github.com/arduino/ArduinoCore-nRF528x-mbedos/issues/49
i tried to use the library with the folowing hardware:
Please help me...
in these exemple i used the sketch "Sdinfo"
Error Message:
Arduino: 1.8.12 (Windows Store 1.8.33.0) (Windows 10), Board: "Arduino Nano 33 BLE"
In file included from d:\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys_default_fcntl.h:200:0,
d:\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\stat.h:27:8: error: redefinition of 'struct stat'
struct stat
In file included from D:\Documents\ArduinoData\packages\arduino\hardware\mbed\1.1.4\cores\arduino/mbed/platform/mbed_error.h:21:0,
D:\Documents\ArduinoData\packages\arduino\hardware\mbed\1.1.4\cores\arduino/mbed/platform/mbed_retarget.h:500:8: note: previous definition of 'struct stat'
struct stat {
exit status 1 Error compiling for board Arduino Nano 33 BLE.
This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.