0

Uncanny Eyes on Teensy 4.1
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Uncanny Eyes on Teensy 4.1

by ssands11 on Mon May 03, 2021 3:25 am

Hi, I was hoping I could use the Uncanny eyes project on a Teensy 4.1
However, I get errors when compiling for 4.1 (no errors if I compile for a 3.1/3.2 teensy).
Is there an updated library I should be using? Other ideas?

The error output is:
Code: Select all | TOGGLE FULL SIZE
Arduino: 1.8.13 (Windows 10), TD: 1.53, Board: "Teensy 4.1, Serial, 600 MHz, Faster, US English"

uncannyEyes: In function 'void drawEye(uint8_t, uint16_t, uint8_t, uint8_t, uint8_t, uint8_t)':

uncannyEyes:466: error: 'KINETISK_SPI0' was not declared in this scope

       while(KINETISK_SPI0.SR & 0xC000); // Wait for space in FIFO

             ^

uncannyEyes:467: error: 'KINETISK_SPI0' was not declared in this scope

       KINETISK_SPI0.PUSHR = p | SPI_PUSHR_CTAS(1) | SPI_PUSHR_CONT;

       ^

uncannyEyes:467: error: 'SPI_PUSHR_CTAS' was not declared in this scope

       KINETISK_SPI0.PUSHR = p | SPI_PUSHR_CTAS(1) | SPI_PUSHR_CONT;

                                                 ^

uncannyEyes:467: error: 'SPI_PUSHR_CONT' was not declared in this scope

       KINETISK_SPI0.PUSHR = p | SPI_PUSHR_CTAS(1) | SPI_PUSHR_CONT;

                                                     ^

uncannyEyes:504: error: 'KINETISK_SPI0' was not declared in this scope

   KINETISK_SPI0.SR |= SPI_SR_TCF;         // Clear transfer flag

   ^

uncannyEyes:504: error: 'SPI_SR_TCF' was not declared in this scope

   KINETISK_SPI0.SR |= SPI_SR_TCF;         // Clear transfer flag

                       ^

'KINETISK_SPI0' was not declared in this scope



This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

ssands11
 
Posts: 3
Joined: Mon May 03, 2021 3:15 am

Re: Uncanny Eyes on Teensy 4.1

by blnkjns on Mon May 03, 2021 5:32 am

You use the custom Teensyduino install of the Arduino IDE?

blnkjns
 
Posts: 632
Joined: Fri Oct 02, 2020 3:33 am

Re: Uncanny Eyes on Teensy 4.1

by ssands11 on Mon May 03, 2021 2:18 pm

blnkjns wrote:You use the custom Teensyduino install of the Arduino IDE?

I did.
However, as per the instructions, I did not use the teensy libs for GFX and the OLED driver. Maybe I need to try that next.

ssands11
 
Posts: 3
Joined: Mon May 03, 2021 3:15 am

Re: Uncanny Eyes on Teensy 4.1

by ssands11 on Mon May 03, 2021 11:04 pm

I tried putting in explicit teensy libraries but that didn't work. Compiles fine for a teensy 3.6 board but not a 4.1 board.
Error happens after this line in the code (line 465):
Code: Select all | TOGGLE FULL SIZE
      // SPI FIFO technique from Paul Stoffregen's ILI9341_t3 library:
      while(KINETISK_SPI0.SR & 0xC000); // Wait for space in FIFO

I did explicitly call that lib from the hardware/teensy/... directory but that didn't help.
Any ideas???

ssands11
 
Posts: 3
Joined: Mon May 03, 2021 3:15 am

Please be positive and constructive with your questions and comments.