compile errors

I have a bunch of sketches that have all compiled fine in the past.Recently I downloaded teensyduino as I was doing a project comparing the speed which different microcontrollers can control a tft. Since uploaded teensyduino most of my sketches will no longer compile.I get compile errors for multiple sketches.I have tried uninstalling arduino IDE and I am still getting the same problem.I am using Arduino 1.8.13 IDE and running Windows 10 on a PC (Alienware r5). I read the troubleshooting guide and there was nothing there that helped. What do you need to help me troubleshoot this.Do you need to error messages I get in ythe Arduino IDE or do I run the Arduino debug program? I am reading aobut these and am a bit confused as to how to begin.I even tried downloading Arduino 1.8.13 on a different PC and downloasding one of the sketches that used to compile fine and I gwet the same error messages. Here is one of the sketches that is causing the problem.I have uploaded this sketch dozens of times onto arduino Unos with zero problems

diskio.c (4.09 KB)

diskio.h (3.53 KB)

display.c (5.08 KB)

display.h (326 Bytes)

ff.c (201 KB)

ff.h (13.3 KB)

ffconf.h (10.1 KB)

integer.h (846 Bytes)

mmc_avr.h (819 Bytes)

mmc_avr_usart_spi.c (20.8 KB)

TFT_ILI9163C_registers.h (2.22 KB)

video-sd-test-usart.ino (2.3 KB)

(deleted)

yes I already asked what you need.Do you need to error file the compiler produces or the ardunio debug file.I am confused as to which you need.Here is the error log file from the compiler

error log.pdf (80.4 KB)

(deleted)

You may want to post using CODE tags ( </> ) or QUOTES.
PDF files dont translate too well to forum use.

Further forum help can be found with the links below.

Could you take a few moments to Learn How To Use The Forum.
Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum.

Here is the error message from the compiler

Arduino: 1.8.13 (Windows 10), Board: "Arduino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\darby\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10813 -build-path C:\Users\darby\AppData\Local\Temp\arduino_build_923328 -warnings=none -build-cache C:\Users\darby\AppData\Local\Temp\arduino_cache_260956 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\darby\Downloads\video-sd-test-usart (3)\video-sd-test-usart\video-sd-test-usart.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\darby\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10813 -build-path C:\Users\darby\AppData\Local\Temp\arduino_build_923328 -warnings=none -build-cache C:\Users\darby\AppData\Local\Temp\arduino_cache_260956 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA-1.3.0.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avrdude-6.3.0-arduino17.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc-7.3.0-atmel3.6.1-arduino7.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\darby\Downloads\video-sd-test-usart (3)\video-sd-test-usart\video-sd-test-usart.ino

Using board 'uno' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Using core 'arduino' from platform in folder: C:\Program Files (x86)\Arduino\hardware\arduino\avr

Detecting libraries used...

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\sketch\\video-sd-test-usart.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Using cached library dependencies for file: C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch\diskio.c

Using cached library dependencies for file: C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch\display.c

Using cached library dependencies for file: C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch\ff.c

Using cached library dependencies for file: C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch\mmc_avr_usart_spi.c

Generating function prototypes...

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\sketch\\video-sd-test-usart.ino.cpp" -o "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE

"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compiling sketch...

Using previously compiled file: C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch\diskio.c.o

Using previously compiled file: C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch\ff.c.o

Using previously compiled file: C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch\mmc_avr_usart_spi.c.o

Using previously compiled file: C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch\display.c.o

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -Wno-error=narrowing -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\cores\\arduino" "-IC:\\Program Files (x86)\\Arduino\\hardware\\arduino\\avr\\variants\\standard" "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\sketch\\video-sd-test-usart.ino.cpp" -o "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\sketch\\video-sd-test-usart.ino.cpp.o"

Compiling libraries...

Compiling core...

Using precompiled core: C:\Users\darby\AppData\Local\Temp\arduino_cache_260956\core\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a

Linking everything together...

"C:\\Program Files (x86)\\Arduino\\hardware\\tools\\avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p -o "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328/video-sd-test-usart.ino.elf" "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\sketch\\diskio.c.o" "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\sketch\\display.c.o" "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\sketch\\ff.c.o" "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\sketch\\mmc_avr_usart_spi.c.o" "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328\\sketch\\video-sd-test-usart.ino.cpp.o" "C:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328/..\\arduino_cache_260956\\core\\core_arduino_avr_uno_0c812875ac70eb4a9b385d8fb077f54c.a" "-LC:\\Users\\darby\\AppData\\Local\\Temp\\arduino_build_923328" -lm

C:\Users\darby\AppData\Local\Temp\cc7MaNZD.ltrans0.ltrans.o: In function `deselect':

C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch/mmc_avr_usart_spi.c:208: undefined reference to `xchg_spi'

C:\Users\darby\AppData\Local\Temp\cc7MaNZD.ltrans0.ltrans.o: In function `select':

C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch/mmc_avr_usart_spi.c:221: undefined reference to `xchg_spi'

C:\Users\darby\AppData\Local\Temp\cc7MaNZD.ltrans0.ltrans.o: In function `wait_ready':

C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch/mmc_avr_usart_spi.c:190: undefined reference to `xchg_spi'

C:\Users\darby\AppData\Local\Temp\cc7MaNZD.ltrans0.ltrans.o: In function `send_cmd':

C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch/mmc_avr_usart_spi.c:315: undefined reference to `xchg_spi'

C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch/mmc_avr_usart_spi.c:316: undefined reference to `xchg_spi'

C:\Users\darby\AppData\Local\Temp\cc7MaNZD.ltrans0.ltrans.o:C:\Users\darby\AppData\Local\Temp\arduino_build_923328\sketch/mmc_avr_usart_spi.c:317: more undefined references to `xchg_spi' follow

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling for board Arduino Uno.

I ran the arduino debug.exe program but the file is huge and the forum editor wont allow me to post it using the CODE function. How do I post the arduino.debug file?

Try posting as a TXT attachment.

just ran the program again afrter startiung the debug file and it worked.Did absolutley nothing differently.Not sure why it is working now when it wasnt working a few miunutes ago? The exact same file compiled with zero errors.

I think I have it figured out after help from the teensy forum.When I ran the arduino.debug program and compiled the sketch there it works.I noticed the arduino version loaded by the arduino.debug is 1.8.4, not the current 1.8.13. My sketch compiles fine on arduino 1.8.4. I was told that the AVR toolchain has been updsated and I am guessing since my sketch extensively uses those there is a compatability probem with my sketch and the newer AVR toolchain.Does that sound reasonable?

Toolchain issues are in a minority but do happen.

Why itself can be other factors such as alternate IDE / development programs installed etc.

Per has some particular knowledge on these types of topics as do a few others.
It is a little beyond my knowledge.