ILI9488_t3 - Support for the ILI9488 on T3.x and beyond...

@mjs513 - Will have to wait... Ordered one yesterday says estimate arrival next Saturday.

Currently looking at DMA code to see about 32 bit transfers for 24 bit to see if it speeds things up or not...

Also questions about SPISettings...
 
Quick update: I did see some changes to try out changing DMA transfers to 32 bit and SPI off of it to 24 bit and test code:
Code:
if (use_dma) {
    emAsync = 0;
    tft.updateScreenAsync();
  } else {
    tft.updateScreen();
  }
  Serial.println(millis() - start_time, DEC);

  if (use_dma && use_fb) {
    while (tft.asyncUpdateActive() && emAsync < 500) ;
    //    delay(500);
    Serial.printf("Async Update Time: %d DMA error status: %x\n",
                     (uint32_t)emAsync, DMA_ES);
  }
The time changed from about 165 to about 153... Not a giant change but everything helps... Pushed up a PR for you to look at.
Also in this made it compile for T3.2 without needing a bunch of the FB variables and likewise added some stuff to keywords.txt
 
@KurtE

PR all merged.

Not a problem with the Rpi display. Put aside for now. Played a little more but think I have to figure out how those 595 are used, but that is something for another day. Should get my other breakout board tomorrow with the display adapter and TS buffer on board so think this week going to be some soldering.
 
@KurtE and @defragster

Decided to play with the 74hc595 attached in the same way as U1 for that Kedei display and I attached a Logic Analyzer to some of the output pins. Labeling is based on: https://github.com/wdim0/esp8266_with_KeDei_lcd_module/blob/master/schema.jpg. In a zoomed view it looks like this:
CaptureZoom.JPG

For the whole run:
Capture.JPG.

this is with the sketch I posted earlier.

Out of curiosity I ran the graphics test sketch for the ILI9341 and saw the same behavior on the output lines. Did this just for the fun of it :)
 
Looks like you are having some fun.

I have received notifications from Ebay that the two different displays I ordered (one like the one with shift registers) shipped. One is guaranteed by Friday, the other expected Saturday....
 
Yep. Not planning on doing any major surgery to any of the libraries to support the display but would be nice to get to figure out how it actually works and get it to display something.
 
@KurtE
Regarding the RPI display I found this that you might want to browse in your free time (haha): https://github.com/juj/fbcp-ili9341/issues/40 as well as this. Think this is one of those projects to do for curiosity rather than try and get implemented. Yes it is 3-wire but - T_CS and L_CS is interrelated can'd have one without the other.
 
@mjs513 - Thanks. I pushed up a slight change to for rotations 2/3 where if not offset... I tried to order one from Adafruit... But won't ship to PMB, they suggested order from Digikey...

You might try my updated simple test
Code:
#include <Adafruit_GFX.h>    // Core graphics library
#include <ST7735_t3.h> // Hardware-specific library
#include <ST7789_t3.h> // Hardware-specific library
#include <SPI.h>

#if defined(__IMXRT1052__) || defined(__IMXRT1062__)  // Teensy 4.x
//#define USE_SPI2
//#define NON_SPI_PINS
#ifdef USE_SPI2
#define TFT_SCLK 37  // SCLK can also use pin 14
#define TFT_MOSI 35  // MOSI can also use pin 7
#elif defined(NON_SPI_PINS)
#define TFT_SCLK 7  // SCLK can also use pin 14
#define TFT_MOSI 8  // MOSI can also use pin 7
#else
#define TFT_SCLK 13  // SCLK can also use pin 14
#define TFT_MOSI 11  // MOSI can also use pin 7
#endif
#define TFT_CS   10  // CS & DC can use pins 2, 6, 9, 10, 15, 20, 21, 22, 23
#define TFT_DC    9  //  but certain pairs must NOT be used: 2+10, 6+9, 20+23, 21+22
#define TFT_RST   23  // RST can use any pin
#define SD_CS     4  // CS for SD card, can use any pin
#else
// T3.X
//#define USE_SPI1
//#define USE_SPI2
#ifdef USE_SPI1
#define TFT_SCLK 32  // T3.5/T3.6
#define TFT_MOSI 0   // 
#define TFT_CS   10  // random digital pin
#define TFT_DC   31   // Only Hardware CS pin on SPI1
#elif defined(USE_SPI2)
#define TFT_SCLK 46  // T3.5/T3.6
#define TFT_MOSI 44   // 
#define TFT_CS   54  // Hardware CS on SPI2
#define TFT_DC   55   // Hardware CS pin on SPI2
#else
#define TFT_SCLK 13  // SCLK can also use pin 14
#define TFT_MOSI 11  // MOSI can also use pin 7
//#define TFT_CS   10  // CS & DC can use pins 2, 6, 9, 10, 15, 20, 21, 22, 23
#define TFT_CS 0xff   // not using CS
#define TFT_DC    9  //  but certain pairs must NOT be used: 2+10, 6+9, 20+23, 21+22
#endif
#define TFT_RST   8  // RST can use any pin
#define SD_CS     4  // CS for SD card, can use any pin
#endif
//#define TFT_CS2   7
#define TFT_BLK 7
// Option 1: use any pins but a little slower
ST7735_t3 tft = ST7735_t3(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
//ST7789_t3 tft = ST7789_t3(TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);

// Option 2: must use the hardware SPI pins
// (for UNO thats sclk = 13 and sid = 11) and pin 10 must be
// an output. This is much faster - also required if you want
// to use the microSD card (see the image drawing example)
//ST7735_t3 tft = ST7735_t3(cs, dc, rst);
float p = 3.1415926;


void setup(void) {
#ifdef TFT_BLK
  pinMode(TFT_BLK, OUTPUT);
  digitalWrite(TFT_BLK, HIGH);
#endif
  pinMode(SD_CS, INPUT_PULLUP);  // don't touch the SD card
  pinMode(TFT_CS, INPUT_PULLUP);

  Serial.begin(9600);
  Serial.print("hello!");

  // Use this initializer if you're using a 1.8" TFT
  tft.initR(INITR_BLACKTAB);
  // Use this initializer (uncomment) if you're using a 1.44" TFT
  //tft.initR(INITR_GREENTAB);
  //tft.initR(INITR_144GREENTAB);
  //tft.initR(INITR_144GREENTAB_OFFSET);
  //tft.setRowColStart(0,0);
  //tft.init(240,240, SPI_MODE3) ;  // use for ILI9488

  Serial.printf("init CS:%d DC:%d MOSI:%d SCLK:%d RST:%d\n ", TFT_CS, TFT_DC, TFT_MOSI, TFT_SCLK, TFT_RST);
  Serial.printf("Row Start:%d  Col Start: %d\n", tft.rowStart(), tft.colStart());
}

uint8_t rotation = 0;
void loop() {
  tft.setRotation(rotation);
  Serial.printf("Set Rotation: %d width: %d height: %d\n", rotation, tft.width(), tft.height());
  rotation = (rotation + 1) & 0x3;
  elapsedMillis timer;
  uint16_t time = millis();
  tft.fillScreen(ST7735_RED);
  tft.fillRect(tft.width() / 2 - 32, 20, 64, tft.height() - 40, ST7735_GREEN);
  tft.fillRect(0, 0, 8, 8, ST7735_BLACK);
  tft.fillRect(tft.width() - 8, tft.height() - 8, 8, 8, ST7735_WHITE);
  tft.drawPixel(0, 0, ST7735_YELLOW);
  tft.drawPixel(1, 1, ST7735_RED);
  tft.drawPixel(2, 2, ST7735_BLUE);
  tft.drawPixel(tft.width() - 1, tft.height() - 1, ST7735_YELLOW);
  tft.drawPixel(tft.width() - 2, tft.height() - 2, ST7735_RED);
  tft.drawPixel(tft.width() - 3, tft.height() - 3, ST7735_BLUE);
  // large block of text
  //delay(2500);
  Serial.println("Hit any key to continue");
  uint8_t loffset = 0;
  for (;;) {
    while (!Serial.available()) ;
    char ch = Serial.read();
    while (Serial.read() != -1) ;
    if (ch == '.') {
      tft.drawRect(loffset, loffset, tft.width() - 2 * loffset, tft.height() - 2 * loffset, ST7735_GREEN);
      loffset++;
    } else break;
  }
}
I hacked in a new TAB color thingy for now: //tft.initR(INITR_144GREENTAB_OFFSET)
Which works with the newer one I received... You might try it.

Again just hitting CR will increment which rotation is showed. Entering .<CR> will draw square (0,0, width, height... ) Which if offsets is correct should show full rectangle... If you enter . again it will shrink size rectangle by 1 ... And try again. So you can maybe start to see how far you are off in different directions...

@defragster - Yep I ordered another one like that on Ebay(https://www.ebay.com/itm/153515689082).. That ships from LA so should get here in next week or so: Again these are ones without CS pin..
 
opps - didn't see no CS - bad enough the driver chip is hit or miss - I saw the pin array and assumed all were there and never looked … and it shows right there in the pics ...

I actually opened debug_tt - I need to see that working again on T_3.x and on T4 through USB at least. I'm going to go back to minimal and ignore the extended stuff I thought could work on USB - as you got that working with custom prints.
 
@KurtE
Downloaded your updated lib and ran your test sketch with the "tft.initR(INITR_144GREENTAB_OFFSET);" and it worked perfect for my display (starts with 3,2 if I remember right, also used "tft.setRowColStart(3,2);" with just the initr_144greentab and that also worked.
 
@KurtE - @MichaelMeissner

Just to let you all I know I did finally get UncannyEyes working on the T4 - simple change to just use drawPixel :). Still have to hook up the bells and whistles (photoresistor, buttons etc).

Kurt - I did have to add in the Adafruit_SPITFT sendCommand just to keep it compatible.

Michael - because Kurt's libraries are really handy should actually be easy to port this over to an ILI9341 :)

Code:
/*!
 @brief   Adafruit_SPITFT Send Command handles complete sending of commands and data
 @param   commandByte       The Command Byte
 @param   dataBytes         A pointer to the Data bytes to send
 @param   numDataBytes      The number of bytes we should send
 */
void ST7735_t3::sendCommand(uint8_t commandByte, uint8_t *dataBytes, uint8_t numDataBytes) {
    beginSPITransaction();
  
    //SPI_DC_LOW(); // Command mode
    writecommand_last(commandByte); // Send the command byte
  
    //SPI_DC_HIGH();
    for (int i=0; i<numDataBytes; i++) {
	  writedata(*dataBytes); // Send the data bytes
      dataBytes++;
    }
  
    endSPITransaction();
}

/*!
 @brief   Adafruit_SPITFT Send Command handles complete sending of commands and const data
 @param   commandByte       The Command Byte
 @param   dataBytes         A pointer to the Data bytes to send
 @param   numDataBytes      The number of bytes we should send
 */
void ST7735_t3::sendCommand(uint8_t commandByte, const uint8_t *dataBytes, uint8_t numDataBytes) {
    beginSPITransaction();

    writecommand_last(commandByte); // Send the command byte
  
    for (int i=0; i<numDataBytes; i++) {
      writedata(pgm_read_byte(dataBytes++)); // Send the data bytes
    }
  
    endSPITransaction();
}

EDIT: Oops forgot to attach the sketch:
View attachment uncannyEyes.zip
 
@KurtE
Downloaded your updated lib and ran your test sketch with the "tft.initR(INITR_144GREENTAB_OFFSET);" and it worked perfect for my display (starts with 3,2 if I remember right, also used "tft.setRowColStart(3,2);" with just the initr_144greentab and that also worked.

I may redo some of these tab names and what they are... That is the INITR_144GREENTAB defined in the Adafruit library starts at 3,2... I probably update it a long time ago to what I have as my displays were all offset differently... So for my other displays, I should probably either:
a) Define new tab name for it...
b) setup to use the tft.setRowColStart...

Not sure if it also would make sense to add my simple test program to the library... If I did would probably remove some of the #define/#ifdef stuff for different boards and different SPI ports... But would add comments that if you specify SCK and MOSI that correspond to another SPI port it will use that port...
 
@mjs513 (and others)
Mike I added your sendCommand... Actually only the one: void ST7735_t3::sendCommand(uint8_t commandByte, const uint8_t *dataBytes, uint8_t numDataBytes);
And I did not do the pgm_read_byte... Figured T3.x/T4 probably don't need these...

Also picked up the other displaysILI948x-displays.jpg

Althoug I see that the Arduino one is a 9486... Wonder how much different
 
@KurtE (and others)

Think the display driver is the same but... You will need to implement 3-wire as well as toggling the Touch_CS pin as well to complete the transfer - that's why I posted the code references.

And yep all you need is the one sendCommand, don't really need the other one. I got my second 7735 display so I could check out if it fully works - also attached a photoresistor. Yes it worked across two displays - pretty cool actually. Having fun with it. Wish I could do a video to demonstrate but would see the T4 and can't do that yet.
 
@mjs513...

Will play soon with that display... May start off by maybe trying to set up an RPI that can at least initialize the display and capture the SPI transfers, to get an idea of what the actual communications are supposed to look like... .

It was interesting to see in some of the things you posted about using with ESP32, that they actually modified the display and added on another chip...

Back on ST7735/89_t3 code - I changed the defaults for the 144GREEN... tab to be compatible with the Adafruit display, as I verified that was what was up in MASTER...
So I updated that, plus updated two of the example apps (graphictest and rotationtest) to these plus put in commented out changes to allow you to set the ROW, COL start numbers that work with my other displays.

Also @Paul - just pulled in this PR :D
 
@KurtE

Cool that the PR got incorporated.

That Adafruit UncannyEyes is pretty nifty - may make a permanent setup for it :) Really nice since you updated the library running at 24Mhz and tested at 48Mhz as well. Still with your updated SPI library as well.

Yeah, saw what the did for the ESP32 - didn't even go further until a few of the solutions shown that you could do it software. May go back to that now that I got uncanny eyes working. Have to see what happens if I start toggling the touch cs in conjunction with the writing data.
 
@mjs5113 - Will need to play some more with your copy of UncannyEyes...

I am wondering in this copy... If you try changing:
//eye[e].display->drawPixel(screenX,screenY,p);
eye[e].display->pushColor(p);
If it will work or not... That is it looks like the code is already setting a rectangle to update, although I don't where it outputs the RAMWR command... Maybe if the function was changed something like:
Note I removed from here a lot of the #ifdef... stuff to make it easier to see...
Code:
void drawEye( // Renders one eye.  Inputs must be pre-clipped & valid.
  uint8_t  e,       // Eye array index; 0 or 1 for left/right
  uint16_t iScale,  // Scale factor for iris (0-1023)
  uint8_t  scleraX, // First pixel X offset into sclera image
  uint8_t  scleraY, // First pixel Y offset into sclera image
  uint8_t  uT,      // Upper eyelid threshold value
  uint8_t  lT) {    // Lower eyelid threshold value

  uint8_t  screenX, screenY, scleraXsave;
  int16_t  irisX, irisY;
  uint16_t p, a;
  uint32_t d;

  uint8_t  irisThreshold = (128 * (1023 - iScale) + 512) / 1024;
  uint32_t irisScale     = IRIS_MAP_HEIGHT * 65536 / irisThreshold;

  // Set up raw pixel dump to entire screen.  Although such writes can wrap
  // around automatically from end of rect back to beginning, the region is
  // reset on each frame here in case of an SPI glitch.
  TFT_SPI.beginTransaction(settings);
  digitalWrite(eyeInfo[e].select, LOW);                        // Chip select

#if defined(_ADAFRUIT_ST7735H_) || defined(_ADAFRUIT_ST77XXH_) // TFT
  eye[e].display->setAddrWindow(0, 0, 128, 128);
 [COLOR="#FF0000"] eye[e].sendCommand(ST7735_RAMWR, nullptr, 0);[/COLOR]

#else // OLED
  eye[e].display->writeCommand(SSD1351_CMD_SETROW);    // Y range
  eye[e].display->spiWrite(0); eye[e].display->spiWrite(SCREEN_HEIGHT - 1);
  eye[e].display->writeCommand(SSD1351_CMD_SETCOLUMN); // X range
  eye[e].display->spiWrite(0); eye[e].display->spiWrite(SCREEN_WIDTH  - 1);
  eye[e].display->writeCommand(SSD1351_CMD_WRITERAM);  // Begin write
#endif
  digitalWrite(eyeInfo[e].select, LOW);                // Re-chip-select
  digitalWrite(DISPLAY_DC, HIGH);                      // Data mode
  // Now just issue raw 16-bit values for every pixel...

  scleraXsave = scleraX; // Save initial X value to reset on each line
  irisY       = scleraY - (SCLERA_HEIGHT - IRIS_HEIGHT) / 2;
  for(screenY=0; screenY<SCREEN_HEIGHT; screenY++, scleraY++, irisY++) {
    scleraX = scleraXsave;
    irisX   = scleraXsave - (SCLERA_WIDTH - IRIS_WIDTH) / 2;
    for(screenX=0; screenX<SCREEN_WIDTH; screenX++, scleraX++, irisX++) {
      if((lower[screenY][screenX] <= lT) ||
         (upper[screenY][screenX] <= uT)) {             // Covered by eyelid
        p = 0;
      } else if((irisY < 0) || (irisY >= IRIS_HEIGHT) ||
                (irisX < 0) || (irisX >= IRIS_WIDTH)) { // In sclera
        p = sclera[scleraY][scleraX];
      } else {                                          // Maybe iris...
        p = polar[irisY][irisX];                        // Polar angle/dist
        d = p & 0x7F;                                   // Distance from edge (0-127)
        if(d < irisThreshold) {                         // Within scaled iris area
          d = d * irisScale / 65536;                    // d scaled to iris image height
          a = (IRIS_MAP_WIDTH * (p >> 7)) / 512;        // Angle (X)
          p = iris[d][a];                               // Pixel = iris
        } else {                                        // Not in iris
          p = sclera[scleraY][scleraX];                 // Pixel = sclera
        }
      }
      
 [COLOR="#FF0000"]     //eye[e].display->drawPixel(screenX,screenY,p);
      eye[e].display->pushColor(p);[/COLOR]
    
    } // end column
  } // end scanline
If that would work and speed things up... Currently it is outputting the rectangle/ramwr/ plus your color for each pixel
 
@KurtE

Ok- gave it a try but doesn't like "nullptr":
Code:
D:\Users\Merli\Documents\Arduino\libraries\ST7735_t3-T4_beta/ST7735_t3.h:141:8: note: candidate: void ST7735_t3::sendCommand(uint8_t, const uint8_t*, uint8_t)
   void sendCommand(uint8_t commandByte, const uint8_t *dataBytes, uint8_t numDataBytes);
        ^

D:\Users\Merli\Documents\Arduino\libraries\ST7735_t3-T4_beta/ST7735_t3.h:142:8: note: candidate: void ST7735_t3::sendCommand(uint8_t, uint8_t*, uint8_t)
   void sendCommand(uint8_t commandByte, uint8_t *dataBytes, uint8_t numDataBytes);
        ^

call of overloaded 'sendCommand(int, std::nullptr_t, int)' is ambiguous
Don't know how to get around this

EDIT: Ok did this:
Code:
  uint8_t nullp;
  eye[e].display->sendCommand(ST7735_RAMWR, &nullp, 0);
However doesn't work correctly - part of the logo stays on the screen and instead of 1 big eye per screen I am see 2 eyes in this config - 1/2 eye, full eye, 1/2 eye.
 
@mjs513 @paul ...

- Right now I am trying to figure out why the UnCannyEyes sketch is wiping out my board... I was running it yesterday, but today when I build it and run it, it crashes... Then Windows gives me a message that there is not a valid USB device connected... Am hoping it was not my cleanup changes to the ST7735 code.... Or my Hardware connections to display. Verified not connection as I unplugged the processor from the breakout board (Paul's). I edited the sketch to change Reset pin to 23 and the 2nd display to 14 (also tried 21), as these are in the RX/TX pins that Paul routed...

Changed setup to start off with printing stuff:
Code:
void setup(void) {
  uint8_t e; // Eye index, 0 to NUM_EYES-1
  Serial.begin(115200);
  while (!Serial && millis() < 3000) ;
  Serial.println("Init");
  delay(2000);
Never shows up.. I hooked up Serial4 to debug window
When I start off blink, the debug starts off like:

Code:
***********IMXRT Startup**********
test 1 -1234567 3
CCM_ANALOG_PLL_USB1=80003000
  enable USB clocks
CCM_ANALOG_PLL_USB1=80003040
Increasing voltage to 1250 mV
need to switch to alternate clock during reconfigure of ARM PLL
USB PLL is running, so we can use 120 MHz
Freq: 12 MHz * 100 / 2 / 1
ARM PLL=80002042
ARM PLL needs reconfigure
ARM PLL=80002064
New Frequency: ARM=600000000, IPG=150000000
BURSTSIZE=00000808
BURSTSIZE=00000808
USB1_TXFILLTUNING=00000000
USB reset took 6 loops
analogInit
usb_serial_reset
usb_serial_configure
usb_cdc_line_coding, baud=0

If I startup this one... I just get a few garbage characters.
Compiling with default Faster
Code:
D:\arduino-1.8.9\arduino-builder -dump-prefs -logger=machine -hardware D:\arduino-1.8.9\hardware -hardware C:\Users\kurte\AppData\Local\Arduino15\packages -hardware C:\Users\kurte\Documents\Arduino\hardware -tools D:\arduino-1.8.9\tools-builder -tools D:\arduino-1.8.9\hardware\tools\avr -tools C:\Users\kurte\AppData\Local\Arduino15\packages -built-in-libraries D:\arduino-1.8.9\libraries -libraries C:\Users\kurte\Documents\Arduino\libraries -fqbn=teensy:avr:teensy4b2:usb=serial,opt=o2std,keys=en-us -ide-version=10809 -build-path C:\Users\kurte\AppData\Local\Temp\arduino_build_749147 -warnings=all -build-cache C:\Users\kurte\AppData\Local\Temp\arduino_cache_507931 -verbose C:\Users\kurte\Documents\Arduino\uncannyEyes\uncannyEyes.ino
D:\arduino-1.8.9\arduino-builder -compile -logger=machine -hardware D:\arduino-1.8.9\hardware -hardware C:\Users\kurte\AppData\Local\Arduino15\packages -hardware C:\Users\kurte\Documents\Arduino\hardware -tools D:\arduino-1.8.9\tools-builder -tools D:\arduino-1.8.9\hardware\tools\avr -tools C:\Users\kurte\AppData\Local\Arduino15\packages -built-in-libraries D:\arduino-1.8.9\libraries -libraries C:\Users\kurte\Documents\Arduino\libraries -fqbn=teensy:avr:teensy4b2:usb=serial,opt=o2std,keys=en-us -ide-version=10809 -build-path C:\Users\kurte\AppData\Local\Temp\arduino_build_749147 -warnings=all -build-cache C:\Users\kurte\AppData\Local\Temp\arduino_cache_507931 -verbose C:\Users\kurte\Documents\Arduino\uncannyEyes\uncannyEyes.ino
Using board 'teensy4b2' from platform in folder: D:\arduino-1.8.9\hardware\teensy\avr
Using core 'teensy4' from platform in folder: D:\arduino-1.8.9\hardware\teensy\avr
Detecting libraries used...
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\sketch\\uncannyEyes.ino.cpp" -o nul
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\sketch\\uncannyEyes.ino.cpp" -o nul
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\sketch\\uncannyEyes.ino.cpp" -o nul
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\ST7735_t3" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\sketch\\uncannyEyes.ino.cpp" -o nul
Using cached library dependencies for file: D:\arduino-1.8.9\hardware\teensy\avr\libraries\SPI\SPI.cpp
Using cached library dependencies for file: C:\Users\kurte\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_GFX.cpp
Using cached library dependencies for file: C:\Users\kurte\Documents\Arduino\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp
Using cached library dependencies for file: C:\Users\kurte\Documents\Arduino\libraries\Adafruit_GFX_Library\glcdfont.c
Using cached library dependencies for file: C:\Users\kurte\Documents\Arduino\libraries\ST7735_t3\ST7735_t3.cpp
Using cached library dependencies for file: C:\Users\kurte\Documents\Arduino\libraries\ST7735_t3\ST7789_t3.cpp
Generating function prototypes...
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -E -CC -x c++ -w -g -Wall -ffunction-sections -fdata-sections -nostdlib -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\ST7735_t3" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\sketch\\uncannyEyes.ino.cpp" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\preproc\\ctags_target_for_gcc_minus_e.cpp"
"D:\\arduino-1.8.9\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\preproc\\ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/precompile_helper" "D:\\arduino-1.8.9\\hardware\\teensy\\avr/cores/teensy4" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147" "D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -x c++-header -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr/cores/teensy4" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/pch/Arduino.h" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/pch/Arduino.h.gch"
Using previously compiled file: C:\Users\kurte\AppData\Local\Temp\arduino_build_749147\pch\Arduino.h.gch

"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++14 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=147 -DARDUINO=10809 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/pch" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4" "-ID:\\arduino-1.8.9\\hardware\\teensy\\avr\\libraries\\SPI" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\kurte\\Documents\\Arduino\\libraries\\ST7735_t3" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\sketch\\uncannyEyes.ino.cpp" -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\sketch\\uncannyEyes.ino.cpp.o"
Compiling libraries...
Compiling library "SPI"
Using previously compiled file: C:\Users\kurte\AppData\Local\Temp\arduino_build_749147\libraries\SPI\SPI.cpp.o
Compiling library "Adafruit_GFX_Library"
Using previously compiled file: C:\Users\kurte\AppData\Local\Temp\arduino_build_749147\libraries\Adafruit_GFX_Library\glcdfont.c.o
Using previously compiled file: C:\Users\kurte\AppData\Local\Temp\arduino_build_749147\libraries\Adafruit_GFX_Library\Adafruit_SPITFT.cpp.o
Using previously compiled file: C:\Users\kurte\AppData\Local\Temp\arduino_build_749147\libraries\Adafruit_GFX_Library\Adafruit_GFX.cpp.o
Compiling library "ST7735_t3"
Using previously compiled file: C:\Users\kurte\AppData\Local\Temp\arduino_build_749147\libraries\ST7735_t3\ST7789_t3.cpp.o
Using previously compiled file: C:\Users\kurte\AppData\Local\Temp\arduino_build_749147\libraries\ST7735_t3\ST7735_t3.cpp.o
Compiling core...
Using precompiled core: C:\Users\kurte\AppData\Local\Temp\arduino_cache_507931\core\core_teensy_avr_teensy4b2_usb_serial,opt_o2std,keys_en-us_44178ada4dfd24cbd2e3430cabf71fb5.a
Linking everything together...
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -O2 -Wl,--gc-sections,--relax "-TD:\\arduino-1.8.9\\hardware\\teensy\\avr\\cores\\teensy4/imxrt1062.ld" -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -o "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/uncannyEyes.ino.elf" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\sketch\\uncannyEyes.ino.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\libraries\\Adafruit_GFX_Library\\Adafruit_GFX.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\libraries\\Adafruit_GFX_Library\\Adafruit_SPITFT.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\libraries\\Adafruit_GFX_Library\\glcdfont.c.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\libraries\\ST7735_t3\\ST7735_t3.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147\\libraries\\ST7735_t3\\ST7789_t3.cpp.o" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/..\\arduino_cache_507931\\core\\core_teensy_avr_teensy4b2_usb_serial,opt_o2std,keys_en-us_44178ada4dfd24cbd2e3430cabf71fb5.a" "-LC:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147" -larm_cortexM7lfsp_math -lm -lstdc++
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/uncannyEyes.ino.elf" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/uncannyEyes.ino.eep"
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/uncannyEyes.ino.elf" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/uncannyEyes.ino.hex"
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/stdout_redirect" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/uncannyEyes.ino.lst" "D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -d -S -C "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/uncannyEyes.ino.elf"
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/stdout_redirect" "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/uncannyEyes.ino.sym" "D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -t -C "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/uncannyEyes.ino.elf"
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/teensy_post_compile" -file=uncannyEyes.ino "-path=C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147" "-tools=D:\\arduino-1.8.9\\hardware\\teensy/../tools/" -board=TEENSY40
Multiple libraries were found for "ST7735_t3.h"
 Used: C:\Users\kurte\Documents\Arduino\libraries\ST7735_t3
 Not used: D:\arduino-1.8.9\hardware\teensy\avr\libraries\ST7735_t3
Using library SPI at version 1.0 in folder: D:\arduino-1.8.9\hardware\teensy\avr\libraries\SPI 
Using library Adafruit_GFX_Library at version 1.5.5 in folder: C:\Users\kurte\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library ST7735_t3 at version 1.0.0 in folder: C:\Users\kurte\Documents\Arduino\libraries\ST7735_t3 
"D:\\arduino-1.8.9\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-size" -A "C:\\Users\\kurte\\AppData\\Local\\Temp\\arduino_build_749147/uncannyEyes.ino.elf"
Sketch uses 197088 bytes (9%) of program storage space. Maximum is 2031616 bytes.
Global variables use 200480 bytes (19%) of dynamic memory, leaving 848096 bytes for local variables. Maximum is 1048576 bytes.
D:\arduino-1.8.9\hardware\teensy/../tools/teensy_post_compile -file=uncannyEyes.ino -path=C:\Users\kurte\AppData\Local\Temp\arduino_build_749147 -tools=D:\arduino-1.8.9\hardware\teensy/../tools -board=TEENSY40 -reboot -port=usb:0/140000/0/7/2 -portlabel=(null) -portprotocol=(null)

I tried out different app (simple st7735 rotation test) and it ran fine with either full constructor or one with just CS, DC, RST...

Using code from posting #263 above, except for changing PINS
 
@KurtE - @paul

Which version of UncannyEyes are you using - the one from Adafruit or the one that I posted. I had the same problem when I was initially running UncannyEyes from Adafruit. Made the changes that I posted and then the problem went away - think it may have been trying to get to an address the wasn't available. I have seen that behavior before but not for a long time. Here is the version I am using:
View attachment uncannyEyes.zip

Admittedly I am not using your latest changes will download the latest now and give it a try - will update this post.

EDIT: Downloaded and installed you latest changes - compiles and runs without issue for me.

EDIT1: Fair warning I changed the default pins.
 
@mjs513 - @Paul -

Actually it is crashing on T3B2 (older one without jumper) - Tried on different one with jumper and it appears to run... At least I am getting debug info... So will move tests over to different board!
 
@mjs513 - @Paul -

Actually it is crashing on T3B2 (older one without jumper) - Tried on different one with jumper and it appears to run... At least I am getting debug info... So will move tests over to different board!

@KurtE - just to add to confusion I just tested the sketch on T4B2(no wire) and the sketch ran without issue - logo and eye displayed fine. I actually have been using T4B2(wire on top).
 
Hopefully this might help? This will put the FAULT display to USB Serial and give any added feedback you inspire with debug_tt calls.

Just saw new post - using T3B2? Jumper? Is that the Pre-Mod with no white wire? Adding Serial# to the pre-Mod is not cool. Maybe resolved now?

Essentials with sketchbook\libraries\debug_tt - this code from : ...\libraries\debug_tt\examples\DebugMem_tt\DebugMem_tt.ino
Code:
[B]#define SERIAL_tt Serial // Send debug_tt output here. Must have SERIAL_tt.begin( ## )
#include "debug_tt.h"
#define BUTTON_ISR 7
[/B]
void setup() {
  Serial.begin(115200);
  while (!Serial && millis() < 5000 );
  SERIAL_tt.println("\n" __FILE__ " " __DATE__ " " __TIME__);
  SERIAL_tt.println("\n********\n T4 connected Serial_tt ******* debug_tt port\n");
  Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
[COLOR="#FF0000"]  debBegin_tt( (HardwareSerial*)&SERIAL_tt, LED_BUILTIN, BUTTON_ISR);
[/COLOR]// …

[B]  deb_tt( 2, micros() ); // Drop this anywhere PARAM 1 is [0-9] and PARAM2 is uint32_t value to record[/B]
}

void loop() {
  static uint16_t ii = 0;
[B][COLOR="#FF0000"]  deb_tt( ii, micros() );[/COLOR][/B]  // Drop this anywhere PARAM 1 is [0-9] and PARAM2 is uint32_t value to record
  ii++;
  ii &= 7;
  delay(200);
  assert_tt( ii%3 );
}


Optional in sketch if there is anything you can show that tells where the code/data is:
Code:
void Debug_Dump(void)
{
  where_tt( );
  printf_tt(" User Custom Debug Dump. Micros==%u", micros());
  // Put code here to call after Fault or assert_tt() - or call it in sketch
  return;
}
 
Back
Top