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);
}
#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;
}
}
/*!
@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();
}
@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.
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
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
uint8_t nullp;
eye[e].display->sendCommand(ST7735_RAMWR, &nullp, 0);
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);
***********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
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)
@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!
[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 );
}
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;
}