I updated to Arduino 1.8.13 and Teensy 1.53 from version that were a couple (or more?) years back. I installed the new Arduino IDE, installed new Teensy, downloaded Grieman's SDFat ZIP file and installed it. I am compiling for Teensy 3.5. I got build errors with that, searched and found that I need to use the Library Manager to install SDFat. Then I Include Library SD, SdFat, and Time. (Not sure SD is needed.) I now get a linker error in a large project that built and ran fine on the much older tools.
The main problem is in SDFat (Greiman). I am using the SdioEx interface for performance. I get an undefined reference when linking:
undefined reference to
At first I thought this was a parameter mismatch or open() was called before it was declared. I reversed the order of exists() and open() in FatFile.h, to no effect. I then created a compile error in the
I then reinstalled everything (minus SD library) and still get the same errors.
Here is the entire build output. Please ignore the type punning warnings - that will be a question for another thread. Also, the SysCall.h duplicates seem to be benign:
I'm not using FatFileSystem.h, AFAIK, so I think this might be an IDE setup problem.
Also, the build is using the arm-none-eabi toolchain. Is that the right one?
The main problem is in SDFat (Greiman). I am using the SdioEx interface for performance. I get an undefined reference when linking:
undefined reference to
when called from FatFile::exist()`FatFile:pen(FatFile*, char const*, unsigned char)'
At first I thought this was a parameter mismatch or open() was called before it was declared. I reversed the order of exists() and open() in FatFile.h, to no effect. I then created a compile error in the
form and got the exact same parameters listed in the error message, so a method of that form exists.FatFile:pen(FatFile*, char const*, unsigned char)
I then reinstalled everything (minus SD library) and still get the same errors.
Here is the entire build output. Please ignore the type punning warnings - that will be a question for another thread. Also, the SysCall.h duplicates seem to be benign:
Code:
ReadWrite.cpp: In function 'bool readAudioFile(const char*)':
ReadWrite.cpp:246: warning: dereferencing type-punned pointer will break strict-aliasing rules
n = *((uint32_t *) &sc1[16]);
^
ReadWrite.cpp:253: warning: dereferencing type-punned pointer will break strict-aliasing rules
n = *((uint16_t *) &sc1[20]);
^
ReadWrite.cpp:260: warning: dereferencing type-punned pointer will break strict-aliasing rules
n = *((uint16_t *) &sc1[22]);
^
ReadWrite.cpp:268: warning: dereferencing type-punned pointer will break strict-aliasing rules
uint32_t audio_rate = *((uint32_t *) &sc1[24]);
^
ReadWrite.cpp:274: warning: dereferencing type-punned pointer will break strict-aliasing rules
uint16_t audio_bps = *((uint16_t *) &sc1[34]);
^
ReadWrite.cpp:281: warning: dereferencing type-punned pointer will break strict-aliasing rules
uint32_t sc2_data_size = *((uint32_t *) &sc1[40]);
^
C:\Users\ROYREI~1\AppData\Local\Temp\arduino_build_912404\sketch\ReadWrite.cpp.o: In function `FatFile::exists(char const*)':
C:\Users\ROYREI~1\Documents\Arduino\libraries\SdFat\src/FatLib/FatFile.h:341: undefined reference to `FatFile::open(FatFile*, char const*, unsigned char)'
C:\Users\ROYREI~1\Documents\Arduino\libraries\SdFat\src/FatLib/FatFile.h:341: undefined reference to `FatFile::open(FatFile*, char const*, unsigned char)'
C:\Users\ROYREI~1\AppData\Local\Temp\arduino_build_912404\sketch\ReadWrite.cpp.o: In function `FatFileSystem::open(char const*, unsigned char)':
C:\Users\ROYREI~1\Documents\Arduino\libraries\SdFat\src/FatLib/FatFileSystem.h:95: undefined reference to `FatFile::open(FatFile*, char const*, unsigned char)'
C:\Users\ROYREI~1\Documents\Arduino\libraries\SdFat\src/FatLib/FatFileSystem.h:95: undefined reference to `FatFile::open(FatFile*, char const*, unsigned char)'
C:\Users\ROYREI~1\Documents\Arduino\libraries\SdFat\src/FatLib/FatFileSystem.h:95: undefined reference to `FatFile::open(FatFile*, char const*, unsigned char)'
collect2.exe: error: ld returned 1 exit status
Multiple libraries were found for "SysCall.h"
Used: C:\Users\ROYREI~1\Documents\Arduino\libraries\SdFat
Not used: C:\Users\ROYREI~1\Documents\Arduino\libraries\arduino_655865
Error compiling for board Teensy 3.5.
Also, the build is using the arm-none-eabi toolchain. Is that the right one?