Ok, I can reproduce that now.
Creepy!
Ok, I can reproduce that now.
Creepy!
It does not happen with GCC 6 - so simplest assumption is: Compiler/Linker Bug.
GCC 8: Does not compile because of WireIMXRT.cpp (see above...)
GCC7: Don't have a installation at the moment.
So, I will not dig deeper.. makes not much sense
Isn't it though . Wonder if it shows the same behavior with other optimizations? Oh - it does work on a T3.6 last I looked.
I'm uploading my working GCC 6 directory to my google-drive- Takes a few minutes. Willl post the link here.
Edit:
- Download arm6.zip,
- extract zip to Arduino/hardware/tools/arm6,
- edit boards.txt: teensy4b2.build.toolchain=arm6/bin/ for use with T4b2 only.
https://drive.google.com/drive/folders/0Bx2Jw84lqebkb2xIYUR4MU1rdzg
@Frank B and @defragster @KurtE
Hope you don't mind but I just downloaded and installed your GCC 6.
@mjs513 - Maybe we should try selecting a lower SPI speed and see if that makes a difference there?
@KurtE Tried several SPI freq lowering it down to 8Mhz but no change to the distorted image.
Note that if I do and include debug_tt it the eyes on both screens display normally.
It looks almost like a memory issue
#if 1 // TOGGLE 0 to exclude and cause BAD USB - set back to 1 and recompile to correct.
#ifdef __cplusplus
extern "C" {
#endif
#if defined(__IMXRT1052__) || defined(__IMXRT1062__)
void HardFault_HandlerC(unsigned int *hardfault_args) {
digitalWriteFast( 13, HIGH );
while (1);
}
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif
"T:\\Ard186t4b2\\hardware\\teensy/../tools/arm6/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 "-IT:\\Ard186t4b2\\hardware\\teensy\\avr\\cores\\teensy4" "T:\\TEMP\\arduino_build_226809\\sketch\\uncannyEyes0.ino.cpp" -o nul
exec: "T:\\Ard186t4b2\\hardware\\teensy/../tools/arm6/bin/arm-none-eabi-g++": file does not exist
Error compiling for board Teensy 4-Beta2.
@defragster - @Frank B
Running into problem with GCC6 - Eigen library that runs fine under GCC7 is now throwing errors so sketch can not compile. Not sure if there will be an impact to anything else - at least for the T4B2
#define LIGHT_PIN_FLIP // If defined, reverse reading from dial/photocell
T:\tCode\T4\uncannyEyes0\uncannyEyes0.ino Jul 16 2019 17:02:07
********
T4 connected Serial_tt ******* debug_tt port
T:\tCode\T4\uncannyEyes0\uncannyEyes0.ino Jul 16 2019 17:02:07InitCreate display #Create display #Reset displaysCall init/begin func for each display
void loop() {
#if defined(LIGHT_PIN) && (LIGHT_PIN >= 0) // Interactive iris
int16_t v = analogRead(LIGHT_PIN); // Raw dial/photocell reading
#ifdef LIGHT_PIN_FLIP
v = 1023 - v; // Reverse reading from sensor
#endif
if (v < LIGHT_MIN) v = LIGHT_MIN; // Clamp light sensor range
else if (v > LIGHT_MAX) v = LIGHT_MAX;
v -= LIGHT_MIN; // 0 to (LIGHT_MAX - LIGHT_MIN)
#ifdef LIGHT_CURVE // Apply gamma curve to sensor input?
v = (int16_t)(pow((double)v / (double)(LIGHT_MAX - LIGHT_MIN),
LIGHT_CURVE) * (double)(LIGHT_MAX - LIGHT_MIN));
#endif
// And scale to iris range (IRIS_MAX is size at LIGHT_MIN)
v = map(v, 0, (LIGHT_MAX - LIGHT_MIN), IRIS_MAX, IRIS_MIN);
#ifdef IRIS_SMOOTH // Filter input (gradual motion)
static int16_t irisValue = (IRIS_MIN + IRIS_MAX) / 2;
irisValue = ((irisValue * 15) + v) / 16;
frame(irisValue);
#else // Unfiltered (immediate motion)
frame(v);
#endif // IRIS_SMOOTH
I have a optoresitor in the loop attached to pin A2 but I've run the sketch with one display with and without it attached.... besides on compile/upload it should be an issue until it runs - so it doesn't even get that far.This code is expecting 10 bit analog 1023 max value? Is this resolving to a fatal value without the #define of LIGHT_PIN_FLIP?:
@defragster - @Frank B
Running into problem with GCC6 - Eigen library that runs fine under GCC7 is now throwing errors so sketch can not compile. Not sure if there will be an impact to anything else - at least for the T4B2
Of course, it's quite possible that there are incompatibilities.
Which errors do you get? We should fix them (if in the core), for the future. Paul will surely want to use a newer toolchain sometime later.
The default GCC 5.4 is quite old.
...
Is there a general idea of when the T4 might be released? …