Problem with ILI9341_t3 in Teensyduino 1.22

Status
Not open for further replies.

dude8604

Member
I just upgraded to Arduino 1.06 and Teensyduino 1.22 from Arduino 1.05 and Teensyduino 1.20 which required uninstalling Arduino first. I had a sketch written which uses the ILI9341_t3 library which compiled and worked fine with Arduino 1.05 and Teensyduino 1.20. Now that I installed the new version, it won't compile. I also tried compiling the example programs that come with the library and got the same error. I'm using a Teensy 3.1 set to 72Mhz.

Code:
  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
Arduino: 1.0.6 + Td: 1.22 (Windows 7), Board: "Teensy 3.1"
In file included from graphicstest.ino:18:0:
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::waitFifoNotFull()':
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:183:9: error: 'SPI0' was not declared in this scope
    sr = SPI0.SR;
         ^
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::waitFifoEmpty()':
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:192:9: error: 'SPI0' was not declared in this scope
    sr = SPI0.SR;
         ^
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::waitTransmitComplete()':
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:198:12: error: 'SPI0' was not declared in this scope
   while (!(SPI0.SR & SPI_SR_TCF)) ; // wait until final output done
            ^
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writecommand_cont(uint8_t)':
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:202:3: error: 'SPI0' was not declared in this scope
   SPI0.PUSHR = c | (pcs_command << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
   ^
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata8_cont(uint8_t)':
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:206:3: error: 'SPI0' was not declared in this scope
   SPI0.PUSHR = c | (pcs_data << 16) | SPI_PUSHR_CTAS(0) | SPI_PUSHR_CONT;
   ^
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata16_cont(uint16_t)':
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:210:3: error: 'SPI0' was not declared in this scope
   SPI0.PUSHR = d | (pcs_data << 16) | SPI_PUSHR_CTAS(1) | SPI_PUSHR_CONT;
   ^
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writecommand_last(uint8_t)':
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:215:3: error: 'SPI0' was not declared in this scope
   SPI0.SR = SPI_SR_TCF;
   ^
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata8_last(uint8_t)':
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:221:3: error: 'SPI0' was not declared in this scope
   SPI0.SR = SPI_SR_TCF;
   ^
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata16_last(uint16_t)':
C:\Program Files (x86)\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:227:3: error: 'SPI0' was not declared in this scope
   SPI0.SR = SPI_SR_TCF;
   ^

This is from the graphicstest example, but all of the example programs give this error. Anyone know what might be causing this and how to fix it? Thanks.
 
The libraries are coming from : \Arduino\libraries\ILI9341_t3/ILI9341_t3.h

Mine are more like this: I:\Teensy163\hardware\teensy\avr\libraries\ILI9341_t3

Maybe this is a feature of 1.0.6 setup? But seems confused.

I started with 1.6.0 and am running 1.6.3 and it has used the teensy\avr type path as I saw it.

In starting with Teensy I went to ZIP extract to a fresh drive / directory in some fashion as shown - then install the TeensyDuino in the directory >> I:\Teensy163 as shown.

Did you download a private build of the libraries? Unless something is holding you back I'd go to the 1.6.x family.
 
Somehow you got an old copy of ILI9341_t3.

It's actually in the Arduino folder. Maybe when you ran the 1.21 or older installer, you had it add the optional libraries, but then when you ran the 1.22 installer you didn't install any libs? That could have left the older versions from a prior Teensyduino installer in your copy of Arduino.

Anyway, the problem is an old pre-1.22 copy of this library being used with the 1.22 stuff. Just run the 1.22 installer again and have it put the newer copy of ILI9341_t3 into your copy of Arduino. I'm confident that will solve this problem.
 
Paul, I just updated my ILI9341_t3 library to the latest on the Github and im having the same issue.

Im using Arduino 1.06 and Teensy Loader 1.20



Code:
In file included from Ecart_screen_015.ino:11:0:
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::waitFifoNotFull()':
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:177:9: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::waitFifoEmpty()':
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:185:9: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::waitTransmitComplete()':
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:191:12: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:192:9: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::waitTransmitComplete(uint32_t)':
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:197:18: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:201:3: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writecommand_cont(uint8_t)':
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:208:3: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata8_cont(uint8_t)':
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:212:3: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata16_cont(uint16_t)':
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:216:3: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writecommand_last(uint8_t)':
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:221:3: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata8_last(uint8_t)':
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:226:3: error: 'KINETISK_SPI0' was not declared in this scope
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h: In member function 'void ILI9341_t3::writedata16_last(uint16_t)':
D:\Arduino\libraries\ILI9341_t3/ILI9341_t3.h:231:3: error: 'KINETISK_SPI0' was not declared in this scope


Guess updating will be the only fix :/
 
Last edited:
Guess updating will be the only fix :/

Yes, if you want to use the new ILI9341_t3 version that depends on changes in newer versions of Teensyduino, then you have to upgrade from the very old Teensyduino 1.20 version!

If you _really_ want to stay on 1.20, you could just delete this copy and use the version that comes from the 1.20 installer. It will work with 1.20.
 
I needed the improvements so I upgraded. I try to avoid upgrading in the middle of projects, it does not always help the project go forward but in some cases stop you cold until you fix new problems it creates.

Running 1.23 B2 everything seems ok.
 
Status
Not open for further replies.
Back
Top