I am trying to use the buil-in SD-Card of the teensy 4.1 in a CNC program in platformio and teensyduino 1.8 19 on a MacBookPro M1 (Monterey)
I have the following includes:
#include "Arduino.h"
#include <stdint.h>
#include <SPI.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
I can also include the SD.h lib,
But when I initialize the SD object as mentioned in the example datalogger
if (!SD.begin(chipSelect)) {
Serial.println("initialization failed!");
return;
}
I get dozends of errors in the sence of
ExFatPartition.cpp:(.text._ZN14ExFatPartition10rootLengthEv+0x0): multiple definition of `ExFatPartition::rootLength()'
.pio/build/teensy41/lib96d/libSdFs.a(ExFatPartition.cpp.o):ExFatPartition.cpp:(.text._ZN14ExFatPartition10rootLengthEv+0x0): first defined here
.pio/build/teensy41/lib760/libSdFat.a(FatPartition.cpp.o): In function `FatPartition::fatGet(unsigned long, unsigned long*)':
FatPartition.cpp:(.text._ZN12FatPartition6fatGetEmPm+0x0): multiple definition of `FatPartition::fatGet(unsigned long, unsigned long*)'
.pio/build/teensy41/lib96d/libSdFs.a(FatPartition.cpp.o):FatPartition.cpp:(.text._ZN12FatPartition6fatGetEmPm+0x0): first defined here
.pio/build/teensy41/lib760/libSdFat.a(FatPartition.cpp.o): In function `FatPartition::allocateCluster(unsigned long, unsigned long*)':
Running the Datalogger example in Teensyduino gives multiple errors in the sense of
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4/FS.h:127:2: note: no known conversion for argument 1 from ‘SDFile*’ to ‘const File&’
/Applications/Teensyduino.app/Contents/Java/hardware/teensy/avr/cores/teensy4/FS.h:117:2: note: candidate: File::File(FileImpl*)
File(FileImpl *file) {
How can I get this to work?