Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: SPI on Teensy 4.0

  1. #1
    Junior Member
    Join Date
    May 2020
    Posts
    9

    SPI on Teensy 4.0

    I try to use SPI on Teensy 4.0. I installed the library SPI-master from github, but I get error messages when compiling:

    C:\Users\Koch\AppData\Local\Temp\arduino_build_477 59\sketch\SPI_Test.ino.cpp.o: In function `setup':
    C:\Users\Koch\Documents\Arduino\Teensy\SPI_Test/SPI_Test.ino:31: undefined reference to `SPI'
    C:\Users\Koch\Documents\Arduino\Teensy\SPI_Test/SPI_Test.ino:31: undefined reference to `SPIClass::begin()'
    C:\Users\Koch\AppData\Local\Temp\arduino_build_477 59\sketch\SPI_Test.ino.cpp.o: In function `loop':
    C:\Users\Koch\Documents\Arduino\Teensy\SPI_Test/SPI_Test.ino:43: undefined reference to `SPI'
    collect2.exe: error: ld returned 1 exit status
    Fehler beim Kompilieren für das Board Teensy 4.0.

    I suppose there is something wrong with the definitions from SPI for the Arduino, but have no clue how to solve this.

    SPI works for normal Arduino. I have to change the include statement to use the correct SPI-library:
    #include <C:\xxx\Documents\Arduino\libraries\SPI-master\SPI.h>
    Why is SPI not known?

    Anybody who had the same problem?

    Best regards

    Edmund

  2. #2
    Junior Member
    Join Date
    May 2020
    Posts
    9
    As the ISP program compiled without errors on a different computer, I made a complete new installation and it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •