Dear Sand Wich,
Thanks for the reply.
I am pretty sure that I am using the Teensy version of the SD.h library. I even renamed the bog standard Arduino one so that
it wouldn't get picked up. Yet, it is still not writing to the SD
I tried two different SD cards (one brand new)...
The output of a verbose compile is:
Code:
/home/marco/arduino-1.8.13/arduino-builder -dump-prefs -logger=machine -hardware /home/marco/arduino-1.8.13/hardware -hardware /home/marco/Arduino/hardware -tools /home/marco/arduino-1.8.13/tools-builder -tools /home/marco/arduino-1.8.13/hardware/tools/avr -built-in-libraries /home/marco/arduino-1.8.13/libraries -libraries /home/marco/Arduino/libraries -fqbn=teensy:avr:teensy41:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10813 -build-path /tmp/arduino_build_606012 -warnings=none -build-cache /tmp/arduino_cache_410159 -verbose /home/marco/Arduino/Teensy41_SD_test/Teensy41_SD_test.ino
/home/marco/arduino-1.8.13/arduino-builder -compile -logger=machine -hardware /home/marco/arduino-1.8.13/hardware -hardware /home/marco/Arduino/hardware -tools /home/marco/arduino-1.8.13/tools-builder -tools /home/marco/arduino-1.8.13/hardware/tools/avr -built-in-libraries /home/marco/arduino-1.8.13/libraries -libraries /home/marco/Arduino/libraries -fqbn=teensy:avr:teensy41:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10813 -build-path /tmp/arduino_build_606012 -warnings=none -build-cache /tmp/arduino_cache_410159 -verbose /home/marco/Arduino/Teensy41_SD_test/Teensy41_SD_test.ino
Using board 'teensy41' from platform in folder: /home/marco/arduino-1.8.13/hardware/teensy/avr
Using core 'teensy4' from platform in folder: /home/marco/arduino-1.8.13/hardware/teensy/avr
Detecting libraries used...
/home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/marco/arduino-1.8.13/hardware/teensy/avr/cores/teensy4 /tmp/arduino_build_606012/sketch/Teensy41_SD_test.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for SD.h: [SD@1.2.4 SD@1.2.2]
ResolveLibrary(SD.h)
-> candidates: [SD@1.2.4 SD@1.2.2]
/home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/marco/arduino-1.8.13/hardware/teensy/avr/cores/teensy4 -I/home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD /tmp/arduino_build_606012/sketch/Teensy41_SD_test.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
Alternatives for SPI.h: [SPI@1.0]
ResolveLibrary(SPI.h)
-> candidates: [SPI@1.0]
/home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/marco/arduino-1.8.13/hardware/teensy/avr/cores/teensy4 -I/home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD -I/home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SPI /tmp/arduino_build_606012/sketch/Teensy41_SD_test.ino.cpp -o /dev/null -DARDUINO_LIB_DISCOVERY_PHASE
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/File.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/SD.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/cache_t3.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/card_t3.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/dir_t3.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/fat_t3.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/file_t3.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/init_t3.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/utility/NXP_SDHC.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/utility/Sd2Card.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/utility/SdFile.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD/utility/SdVolume.cpp
Using cached library dependencies for file: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SPI/SPI.cpp
Generating function prototypes...
/home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/marco/arduino-1.8.13/hardware/teensy/avr/cores/teensy4 -I/home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD -I/home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SPI /tmp/arduino_build_606012/sketch/Teensy41_SD_test.ino.cpp -o /tmp/arduino_build_606012/preproc/ctags_target_for_gcc_minus_e.cpp -DARDUINO_LIB_DISCOVERY_PHASE
/home/marco/arduino-1.8.13/tools-builder/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /tmp/arduino_build_606012/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/home/marco/arduino-1.8.13/hardware/teensy/../tools/precompile_helper /home/marco/arduino-1.8.13/hardware/teensy/avr/cores/teensy4 /tmp/arduino_build_606012 /home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/home/marco/arduino-1.8.13/hardware/teensy/avr/cores/teensy4 /tmp/arduino_build_606012/pch/Arduino.h -o /tmp/arduino_build_606012/pch/Arduino.h.gch
Using previously compiled file: /tmp/arduino_build_606012/pch/Arduino.h.gch
/home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-g++ -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=153 -DARDUINO=10813 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -I/tmp/arduino_build_606012/pch -I/home/marco/arduino-1.8.13/hardware/teensy/avr/cores/teensy4 -I/home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD -I/home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SPI /tmp/arduino_build_606012/sketch/Teensy41_SD_test.ino.cpp -o /tmp/arduino_build_606012/sketch/Teensy41_SD_test.ino.cpp.o
Compiling libraries...
Compiling library "SD"
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/cache_t3.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/dir_t3.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/init_t3.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/File.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/SD.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/card_t3.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/fat_t3.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/file_t3.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/utility/NXP_SDHC.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/utility/Sd2Card.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/utility/SdVolume.cpp.o
Using previously compiled file: /tmp/arduino_build_606012/libraries/SD/utility/SdFile.cpp.o
Compiling library "SPI"
Using previously compiled file: /tmp/arduino_build_606012/libraries/SPI/SPI.cpp.o
Compiling core...
Using precompiled core: /tmp/arduino_cache_410159/core/core_6c39079b90190c67f8ac0eafcdd6ad78.a
Linking everything together...
/home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-gcc -O2 -Wl,--gc-sections,--relax -T/home/marco/arduino-1.8.13/hardware/teensy/avr/cores/teensy4/imxrt1062_t41.ld -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -o /tmp/arduino_build_606012/Teensy41_SD_test.ino.elf /tmp/arduino_build_606012/sketch/Teensy41_SD_test.ino.cpp.o /tmp/arduino_build_606012/libraries/SD/File.cpp.o /tmp/arduino_build_606012/libraries/SD/SD.cpp.o /tmp/arduino_build_606012/libraries/SD/cache_t3.cpp.o /tmp/arduino_build_606012/libraries/SD/card_t3.cpp.o /tmp/arduino_build_606012/libraries/SD/dir_t3.cpp.o /tmp/arduino_build_606012/libraries/SD/fat_t3.cpp.o /tmp/arduino_build_606012/libraries/SD/file_t3.cpp.o /tmp/arduino_build_606012/libraries/SD/init_t3.cpp.o /tmp/arduino_build_606012/libraries/SD/utility/NXP_SDHC.cpp.o /tmp/arduino_build_606012/libraries/SD/utility/Sd2Card.cpp.o /tmp/arduino_build_606012/libraries/SD/utility/SdFile.cpp.o /tmp/arduino_build_606012/libraries/SD/utility/SdVolume.cpp.o /tmp/arduino_build_606012/libraries/SPI/SPI.cpp.o /tmp/arduino_build_606012/../arduino_cache_410159/core/core_6c39079b90190c67f8ac0eafcdd6ad78.a -L/tmp/arduino_build_606012 -larm_cortexM7lfsp_math -lm -lstdc++
/home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /tmp/arduino_build_606012/Teensy41_SD_test.ino.elf /tmp/arduino_build_606012/Teensy41_SD_test.ino.eep
/home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-objcopy -O ihex -R .eeprom /tmp/arduino_build_606012/Teensy41_SD_test.ino.elf /tmp/arduino_build_606012/Teensy41_SD_test.ino.hex
/home/marco/arduino-1.8.13/hardware/teensy/../tools/stdout_redirect /tmp/arduino_build_606012/Teensy41_SD_test.ino.lst /home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-objdump -d -S -C /tmp/arduino_build_606012/Teensy41_SD_test.ino.elf
/home/marco/arduino-1.8.13/hardware/teensy/../tools/stdout_redirect /tmp/arduino_build_606012/Teensy41_SD_test.ino.sym /home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-objdump -t -C /tmp/arduino_build_606012/Teensy41_SD_test.ino.elf
/home/marco/arduino-1.8.13/hardware/teensy/../tools/teensy_post_compile -file=Teensy41_SD_test.ino -path=/tmp/arduino_build_606012 -tools=/home/marco/arduino-1.8.13/hardware/teensy/../tools/ -board=TEENSY41
Multiple libraries were found for "SD.h"
Used: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD
Not used: /home/marco/arduino-1.8.13/libraries/SD
Using library SD at version 1.2.2 in folder: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SD
Using library SPI at version 1.0 in folder: /home/marco/arduino-1.8.13/hardware/teensy/avr/libraries/SPI
/home/marco/arduino-1.8.13/hardware/teensy/../tools/arm/bin/arm-none-eabi-size -A /tmp/arduino_build_606012/Teensy41_SD_test.ino.elf
Sketch uses 30656 bytes (0%) of program storage space. Maximum is 8126464 bytes.
Global variables use 45756 bytes (8%) of dynamic memory, leaving 478532 bytes for local variables. Maximum is 524288 bytes.