Teensyduino 1.60 Beta #5

Paul

Administrator
Staff member
Here is a fifth beta test for Teensyduino 1.60.

Arduino 2.3.x, all systems:
1: Quit Teensy Loader, if running
2: Use Boards Manager to uninstall Teensy, if previously installed
3: Use File > Preferences (Arduino IDE > Settings on MacOS) to install new URL
4: Press Ctrl-Shift-P (Command-Shift-P on MacOS) click "Arduino: Update Indexes"
5: Use Boards Manager to install Teensy
6: Restart Arduino IDE (if using plugin for Lockable Teensy)

Arduino 1.8.x, Linux 64 bit:

Arduino 1.8.x, Linux ARM:

Arduino 1.8.x, Linux ARM64:

Arduino 1.8.x, Windows:

PlatformIO, DIY beta support:


Changes since Teensyduino 1.60-beta4:

Support for 16 MByte PSRAM chip (thanks Jonathan Oakley)
Increase QSPI clock speed from 88 MHz to 105.6 MHz
LittleFS detect QSPI setup, don't assume 8MB PSRAM offset
Fix DMA TCD copy out of order by compiler optimization (jmarsh)
FS class and LittleFS use constexpr constructor
Improve PLL PFD setup, hopefully fixes weird crashes
Remove delays and forced optimize, not needed with PFD fix
Fix AudioMemory with optimize Smallest Code with LTO
DMAChannel default channel preemption settings
SdFat examples recommend at most 25 MHz for SPI
CrashReport minor changes to printed message (Shawn Silverman)
 
Last edited:
If you have time to run tests, please try your favorite program with all the Tools > Optimization settings. Does it compile and actually run with all of them? This beta version tries to fix a very strange problem which would often manifest as some optimization levels working but crashing on others.
 
@PaulStoffregen

Updated to latest and greatest without issue on a Win 11 home edition pc.

Tried a failing involved sketch at faster, fastest and smallest w/LTO all compiled and ran without issue
 
Installed:

Teensy.exe - Had to create an exception to run with Norton...

Was curious, you have MTP example: I saw a few different directories under the libraries\_teensy
but only the Basic_SD_Card showed up in the Arduino examples. Looked again and the other
directories were empty (Basic_FlashChip, Basic_ProgramMemory, Basic_USB_Drive).

Note: It would not build for me at first as I have the SDFat library installed by Arduino.
Did the hack I mentioned on Beta 4
And now it builds and runs.

And it showed the files off of my SDCard on a Micromod.

I tried on of my own MTP apps, and it did not detect that MTP was installed as I was detecting it by:
Code:
#ifdef MTP_TEENSY_H

But I see that, this is no longer defined, but instead is relying on: #pragma once

No big deal but others might run into it.
 
Both IDE #1 and #2 updated here and built sketches at hand normally.

Does IDE #2 build horrendously slowly or is it just me? IDE #1 much quicker to build and upload it seems.
 
Decided to double check MTP again using same sketch that I used in Beta4 and ran into the issue of SDfat conflict. So used @KurtE's fix:
As for example, I might want to use SDFat library work with Arduino boards such as the GIGA or Portenta or ...
If I have it installed, a lot of programs that we have for Teensy will not build.

I ran into that today, I did a quick and dirty hack today in the 0.60.4 build, where in your copy of SDFat,
I added a file Teensy_SdFat.h with the content:
Code:
#include "SdFat.h"
I then changed SD.h to include this file instead of SdFat.h...
Now it builds my teensy sketches that use SD library again...

Probably not a complete solution, but at least I can build on both systems again...

After that I compiled the sketch with Fastest w/LTO and got a bunch of warnings but still compiled, loaded and ran.

Warnings:

Code:
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.60.5\libraries\LittleFS\src\LittleFS_NAND.cpp: In member function 'uint8_t LittleFS_SPINAND::addBBLUT(uint32_t)':
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.60.5\libraries\LittleFS\src\LittleFS_NAND.cpp:681:17: warning: variable 'firstOpenEntry' set but not used [-Wunused-but-set-variable]
  681 |         uint8_t firstOpenEntry = 0;
      |                 ^~~~~~~~~~~~~~
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.60.5\libraries\LittleFS\src\LittleFS_NAND.cpp: In member function 'uint8_t LittleFS_QPINAND::addBBLUT(uint32_t)':
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.60.5\libraries\LittleFS\src\LittleFS_NAND.cpp:1450:18: warning: variable 'pba' set but not used [-Wunused-but-set-variable]
 1450 |         uint16_t pba, lba;
      |                  ^~~
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.60.5\libraries\LittleFS\src\LittleFS_NAND.cpp:1450:23: warning: variable 'lba' set but not used [-Wunused-but-set-variable]
 1450 |         uint16_t pba, lba;
      |                       ^~~
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.60.5\cores\teensy4\MTP_Teensy.cpp:42:44: warning: type of 'usb_string_serial_number' does not match original declaration [-Wlto-type-mismatch]
   42 | extern struct usb_string_descriptor_struct usb_string_serial_number;
      |                                            ^
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.60.5\cores\teensy4\usb_desc.c:2739:44: note: type 'struct usb_string_descriptor_struct' should match type 'struct usb_string_descriptor_struct'
 2739 | extern struct usb_string_descriptor_struct usb_string_serial_number
      |                                            ^
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.60.5\cores\teensy4\usb_names.h:43:8: note: the incompatible type is defined here
   43 | struct usb_string_descriptor_struct {
      |        ^
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.60.5\cores\teensy4\usb_desc.c:2739:44: note: 'usb_string_serial_number' was previously declared here
 2739 | extern struct usb_string_descriptor_struct usb_string_serial_number
      |                                            ^
C:\Users\Merli\AppData\Local\Arduino15\packages\teensy\hardware\avr\0.60.5\cores\teensy4\usb_desc.c:2739:44: note: code may be misoptimized unless '-fno-strict-aliasing' is used
Opening Teensy Loader...
Memory Usage on Teensy 4.1:
  FLASH: code:220264, data:24404, headers:8256   free for files:7873540
   RAM1: variables:75008, code:212728, padding:16648   free for local variables:219904
   RAM2: variables:28800  free for malloc/new:495488

Transfered a file to the extmem (8mb) don;t have a 16mb version yet:
Code:
Filesystems Selected with '2 {number}' command:
 FS #0  Present=Yes  Size=640 kB  Name=PROGRAM
 FS #1  Present=Yes  Size=45 kB  Name=EXTMEM
 FS #2  Present=Yes  Size=1 MB  Name=EXTMEM
 FS #3  Present=Yes  Size=59 GB  Name=(null)  Info=SD Card
 FS #4  Present=Yes  Size=16 MB  Name=W25Q128JV-Q  Info=QSPI
 FS #5  Present=Yes  Size=126 MB  Name=W25N01GVZEIG  Info=MEMBOARD CS pin 3
 FS #6  Present=Yes  Size=253 MB  Name=W25N02KVZEIR  Info=MEMBOARD CS pin 4
 FS #7  Present=Yes  Size=64 MB  Name=W25Q512JV-M  Info=MEMBOARD CS pin 5
 FS #8  Present=Yes  Size=64 MB  Name=W25Q512JV-Q  Info=MEMBOARD CS pin 6
 FS #9  Present=Yes  Size=231 GB  Name=USB DISK  Info=USB
 FS #10  Present=No   Size=0 kB  Name=  Info=USB
 FS #11  Present=No   Size=0 kB  Name=  Info=USB
 FS #12  Present=No   Size=0 kB  Name=  Info=USB
 FS #13  Present=No   Size=0 kB  Name=  Info=USB
 FS #14  Present=No   Size=0 kB  Name=  Info=USB
 FS #15  Present=No   Size=0 kB  Name=  Info=USB
 FS #16  Present=No   Size=0 kB  Name=  Info=USB
Filesystem #2 "EXTMEM" selected


 Space Used = 389120
Filesystem Size = 1536000
Directory
---------
34df85018cee199c2719ff6a99d562b7.png  382660

Also was able to open and play a wav file from the usb drive
 
Upgraded to Beta 5 on WIN 11 with IDE 2.3.6

I ran my usual memory test with 16MB PSRAM and 256MB/2Gb Flash. It runs the standard PSRAM test and then does a quick check of any Flash that is also attached.

Fast, Fast with LTO, Faster, Faster with LTO compile settings all pass
Fastest gives an "Error Starting QSPI Disk" error. I checked both at 120MHz and the default 105.6MHz QSPI bus rate.
Fastest with LTO passes OK

Running Fastest with 8MB PSRAM and 256MB Flash passes so perhaps some remaining issue with the PSRAM/Flash boundary with 16MB part on that compiler setting.

Next tried running Smallest Code and Smallest Code with LTO and when it gets to the end of PSRAM testing, the Teensy resets. It also does this with the standard 8MB PSRAM / 256MB Flash setup as well. I have never used this option so not sure if this is new feature or not.

For completeness, here is the code.
Code:
/*
  Combined PSRAM and Flash test programs
  - Set Flash Type NOR or NAND
*/
#include "LittleFS.h"
//LittleFS_QSPIFlash myfs;  // NOR FLASH
LittleFS_QPINAND myfs;  // NAND FLASH 1Gb
File file, file1, file3;

extern "C" uint8_t external_psram_size;

bool memory_ok = false;
uint32_t *memory_begin, *memory_end;

bool check_fixed_pattern(uint32_t pattern);
bool check_lfsr_pattern(uint32_t seed);

uint64_t fTot, totSize1;

void setup() {
  while (!Serial)
    ;  // wait for serial connection

  //**************************
  //Reset clock to 120 or 132 Mhz
  CCM_CCGR7 |= CCM_CCGR7_FLEXSPI2(CCM_CCGR_OFF);
  // CCM_CBCMR=95AE8304;     // 105.6MHz (default)
  CCM_CBCMR = 0xB5AE8104;    // 120MHz   (16MB PSRAM)
  // CCM_CBCMR= 0x55AE8004;  // 132MHz   (8MB PSRAM)
  // CCM_CBCMR=95AE8104;     // 144MHz
  // CCM_CBCMR=75AE8204;     //166.2 MHz
  CCM_CCGR7 |= CCM_CCGR7_FLEXSPI2(CCM_CCGR_ON);
  //**************************

  pinMode(13, OUTPUT);
  /******************************************
  PSRAM Test
  *******************************************/
  uint8_t size = external_psram_size;
  Serial.printf("PSRAM Memory Test, %d Mbyte\n", size);
  if (size == 0) return;
  const float clocks[4] = { 396.0f, 720.0f, 664.62f, 528.0f };
  const float frequency = clocks[(CCM_CBCMR >> 8) & 3] / (float)(((CCM_CBCMR >> 29) & 7) + 1);
  Serial.printf(" CCM_CBCMR=%08X (%.1f MHz)\n", CCM_CBCMR, frequency);
  memory_begin = (uint32_t *)(0x70000000);
  memory_end = (uint32_t *)(0x70000000 + size * 1048576);
  elapsedMillis msec = 0;
  if (!check_fixed_pattern(0x5A698421)) return;
  if (!check_lfsr_pattern(2976674124ul)) return;
  if (!check_lfsr_pattern(1438200953ul)) return;
  if (!check_lfsr_pattern(3413783263ul)) return;
  if (!check_lfsr_pattern(1900517911ul)) return;
  if (!check_lfsr_pattern(1227909400ul)) return;
  if (!check_lfsr_pattern(276562754ul)) return;
  if (!check_lfsr_pattern(146878114ul)) return;
  if (!check_lfsr_pattern(615545407ul)) return;
  if (!check_lfsr_pattern(110497896ul)) return;
  if (!check_lfsr_pattern(74539250ul)) return;
  if (!check_lfsr_pattern(4197336575ul)) return;
  if (!check_lfsr_pattern(2280382233ul)) return;
  if (!check_lfsr_pattern(542894183ul)) return;
  if (!check_lfsr_pattern(3978544245ul)) return;
  if (!check_lfsr_pattern(2315909796ul)) return;
  if (!check_lfsr_pattern(3736286001ul)) return;
  if (!check_lfsr_pattern(2876690683ul)) return;
  if (!check_lfsr_pattern(215559886ul)) return;
  if (!check_lfsr_pattern(539179291ul)) return;
  if (!check_lfsr_pattern(537678650ul)) return;
  if (!check_lfsr_pattern(4001405270ul)) return;
  if (!check_lfsr_pattern(2169216599ul)) return;
  if (!check_lfsr_pattern(4036891097ul)) return;
  if (!check_lfsr_pattern(1535452389ul)) return;
  if (!check_lfsr_pattern(2959727213ul)) return;
  if (!check_lfsr_pattern(4219363395ul)) return;
  if (!check_lfsr_pattern(1036929753ul)) return;
  if (!check_lfsr_pattern(2125248865ul)) return;
  if (!check_lfsr_pattern(3177905864ul)) return;
  if (!check_lfsr_pattern(2399307098ul)) return;
  if (!check_lfsr_pattern(3847634607ul)) return;
  if (!check_lfsr_pattern(27467969ul)) return;
  if (!check_lfsr_pattern(520563506ul)) return;
  if (!check_lfsr_pattern(381313790ul)) return;
  if (!check_lfsr_pattern(4174769276ul)) return;
  if (!check_lfsr_pattern(3932189449ul)) return;
  if (!check_lfsr_pattern(4079717394ul)) return;
  if (!check_lfsr_pattern(868357076ul)) return;
  if (!check_lfsr_pattern(2474062993ul)) return;
  if (!check_lfsr_pattern(1502682190ul)) return;
  if (!check_lfsr_pattern(2471230478ul)) return;
  if (!check_lfsr_pattern(85016565ul)) return;
  if (!check_lfsr_pattern(1427530695ul)) return;
  if (!check_lfsr_pattern(1100533073ul)) return;
  if (!check_fixed_pattern(0x55555555)) return;
  if (!check_fixed_pattern(0x33333333)) return;
  if (!check_fixed_pattern(0x0F0F0F0F)) return;
  if (!check_fixed_pattern(0x00FF00FF)) return;
  if (!check_fixed_pattern(0x0000FFFF)) return;
  if (!check_fixed_pattern(0xAAAAAAAA)) return;
  if (!check_fixed_pattern(0xCCCCCCCC)) return;
  if (!check_fixed_pattern(0xF0F0F0F0)) return;
  if (!check_fixed_pattern(0xFF00FF00)) return;
  if (!check_fixed_pattern(0xFFFF0000)) return;
  if (!check_fixed_pattern(0xFFFFFFFF)) return;
  if (!check_fixed_pattern(0x00000000)) return;
  Serial.printf(" test ran for %.2f seconds\n", (float)msec / 1000.0f);
  Serial.println("All PSRAM memory tests passed :-)");
  memory_ok = true;

  delay(1000);

  /******************************************
  Flash Test
  *******************************************/
  Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
  Serial.println("QSPI Flash Memory Test");
  delay(5);

  if (!myfs.begin()) {
    Serial.printf("Error starting QSPI Disk");
    while (1)
      ;
  }
  Serial.printf("TotalSize (Bytes): %d\n", myfs.totalSize());
  delay(1000);

  Serial.println("Create files");
  myfs.mkdir("directory1");

  file = myfs.open("directory1/temp_test.txt", FILE_WRITE);
  delay(10);
  file.println("SOME DATA TO TEST");
  file.close();

  file = myfs.open("temp_test1.txt", FILE_WRITE);
  delay(10);
  file.println("The quick brown fox jumped over the lazy dogs back.");
  file.close();

  file = myfs.open("temp_test2.txt", FILE_WRITE);
  delay(10);
  file.println("SOME DATA TO TEST");
  file.close();

  printDirectory();

  File dataFile = myfs.open("temp_test1.txt");  // open the file.
  Serial.print("Print contents of temp_test1.txt:  ");

  if (dataFile) {  // if the file is available, Read from it:
    while (dataFile.available()) {
      Serial.write(dataFile.read());
    }
    dataFile.close();
  } else {
    Serial.println("error opening temptest1.txt");
  }

  Serial.printf("Disk Usage:\n");
  Serial.printf("Bytes Used: %llu, Bytes Total:%llu\n", myfs.usedSize(), myfs.totalSize());

  Serial.println();
  Serial.println("Erase Flash");
  myfs.quickFormat();
  printDirectory();
  Serial.printf("Disk Usage:\n");
  Serial.printf("Bytes Used: %llu, Bytes Total:%llu\n", myfs.usedSize(), myfs.totalSize());
}

bool fail_message(volatile uint32_t *location, uint32_t actual, uint32_t expected) {
  Serial.printf(" Error at %08X, read %08X but expected %08X\n",
                (uint32_t)location, actual, expected);
  return false;
}

// fill the entire RAM with a fixed pattern, then check it
bool check_fixed_pattern(uint32_t pattern) {
  volatile uint32_t *p;
  Serial.printf("testing with fixed pattern %08X\n", pattern);
  for (p = memory_begin; p < memory_end; p++) {
    *p = pattern;
  }
  arm_dcache_flush_delete((void *)memory_begin,
                          (uint32_t)memory_end - (uint32_t)memory_begin);
  for (p = memory_begin; p < memory_end; p++) {
    uint32_t actual = *p;
    if (actual != pattern) return fail_message(p, actual, pattern);
  }
  return true;
}

// fill the entire RAM with a pseudo-random sequence, then check it
bool check_lfsr_pattern(uint32_t seed) {
  volatile uint32_t *p;
  uint32_t reg;

  Serial.printf("testing with pseudo-random sequence, seed=%u\n", seed);
  reg = seed;
  for (p = memory_begin; p < memory_end; p++) {
    *p = reg;
    for (int i = 0; i < 3; i++) {
      if (reg & 1) {
        reg >>= 1;
        reg ^= 0x7A5BC2E3;
      } else {
        reg >>= 1;
      }
    }
  }
  arm_dcache_flush_delete((void *)memory_begin,
                          (uint32_t)memory_end - (uint32_t)memory_begin);
  reg = seed;
  for (p = memory_begin; p < memory_end; p++) {
    uint32_t actual = *p;
    if (actual != reg) return fail_message(p, actual, reg);
    //Serial.printf(" reg=%08X\n", reg);
    for (int i = 0; i < 3; i++) {
      if (reg & 1) {
        reg >>= 1;
        reg ^= 0x7A5BC2E3;
      } else {
        reg >>= 1;
      }
    }
  }
  return true;
}
void printDirectory() {

  Serial.println("printDirectory\n--------------");
  printDirectory(myfs.open("/"), 0);
  Serial.println();
}
void printDirectory(File dir, int numTabs) {
  uint64_t fSize = 0;
  uint32_t dCnt = 0, fCnt = 0;
  if (0 == dir) {
    Serial.printf("\t>>>\t>>>>> No Dir\n");
    return;
  }
  while (true) {
    File entry = dir.openNextFile();
    if (!entry) {
      // no more files
      Serial.printf("\n %u dirs with %u files of Size %u Bytes\n", dCnt, fCnt, fSize);
      fTot += fCnt;
      totSize1 += fSize;
      break;
    }
    for (uint8_t i = 0; i < numTabs; i++) {
      Serial.print('\t');
    }

    if (entry.isDirectory()) {
      Serial.print("DIR\t");
      dCnt++;
    } else {
      Serial.print("FILE\t");
      fCnt++;
      fSize += entry.size();
    }
    Serial.print(entry.name());
    if (entry.isDirectory()) {
      Serial.println(" / ");
      printDirectory(entry, numTabs + 1);
    } else {
      // files have sizes, directories do not
      Serial.print("\t\t");
      Serial.println(entry.size(), DEC);
    }
    entry.close();
    //Serial.flush();
  }
}

void loop() {
  digitalWrite(13, HIGH);
  delay(100);
  if (!memory_ok) digitalWrite(13, LOW);  // rapid blink if any test fails
  delay(100);
}
 
Fastest gives an "Error Starting QSPI Disk" error. I checked both at 120MHz and the default 105.6MHz QSPI bus rate.
Confirming this.

Same A & B T_4.1's as in p#9
A :: Fastest okay with or without LTO
B :: Fastest okay with LTO, but fails Flash part with no LTO: "Error starting QSPI DiskPSRAM Memory Test, 8 Mbyte"
 
Correct me if I'm wrong but if the intent is to check *any* flash that is attached, it should be using a LittleFS_QSPI object rather than LittleFS_QSPINAND ?

(Not suggesting this is related to the error, merely a suggestion for making the test more sturdy.)
 
LittleFS_QSPI object
Was that a change to allow auto adapting to any NOR or NAND Flash?

Note edited above code to use that: LittleFS_QSPI myfs; // FLASH

and got this until removed : // myfs.quickFormat();
Code:
KH_16MBpsramTst: In function 'void setup()':
KH_16MBpsramTst:165: error: 'class LittleFS_QSPI' has no member named 'quickFormat'
  165 |   myfs.quickFormat();
      |        ^~~~~~~~~~~
Using library LittleFS at version 1.0.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS
Using library SPI at version 1.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SPI
'class LittleFS_QSPI' has no member named 'quickFormat'

First T_4.1 "B" has a NAND

Found a third T_4.1 with NOR Flash but NO PSRAM and it works
>> FASTEST with and without LTO

ALSO note the :: myfs.quickFormat();
WORKS with either of these properly selected:
Code:
LittleFS_QSPIFlash myfs;  // NOR FLASH
LittleFS_QPINAND myfs;  // NAND FLASH 1Gb

But as noted above the quickFormat() is an ERROR using : LittleFS_QSPI myfs; // FLASH

Here is an EDIT of @KenHahn code above that will SKIP PSRAM test and continue to FLASH test when no PSRAM installed:
EDITED in .format() to replace the unshared .quickFormat()
Code:
/*
  Combined PSRAM and Flash test programs
  - Set Flash Type NOR or NAND
  https://forum.pjrc.com/index.php?threads/teensyduino-1-60-beta-5.77176/post-360457
*/
#include "LittleFS.h"
//LittleFS_QSPIFlash myfs;  // NOR FLASH
//LittleFS_QPINAND myfs;  // NAND FLASH 1Gb
LittleFS_QSPI myfs;  // FLASH
File file, file1, file3;

extern "C" uint8_t external_psram_size;

bool memory_ok = false;
uint32_t *memory_begin, *memory_end;

bool check_fixed_pattern(uint32_t pattern);
bool check_lfsr_pattern(uint32_t seed);

uint64_t fTot, totSize1;

void setup() {
  while (!Serial)
    ;  // wait for serial connection

  //**************************
  //Reset clock to 120 or 132 Mhz
  CCM_CCGR7 |= CCM_CCGR7_FLEXSPI2(CCM_CCGR_OFF);
  // CCM_CBCMR=95AE8304;     // 105.6MHz (default)
  CCM_CBCMR = 0xB5AE8104;    // 120MHz   (16MB PSRAM)
  // CCM_CBCMR= 0x55AE8004;  // 132MHz   (8MB PSRAM)
  // CCM_CBCMR=95AE8104;     // 144MHz
  // CCM_CBCMR=75AE8204;     //166.2 MHz
  CCM_CCGR7 |= CCM_CCGR7_FLEXSPI2(CCM_CCGR_ON);
  //**************************

  pinMode(13, OUTPUT);
  /******************************************
    PSRAM Test
  *******************************************/
  uint8_t size = external_psram_size;
  Serial.printf("PSRAM Memory Test, %d Mbyte\n", size);
  if (size != 0) {
    const float clocks[4] = { 396.0f, 720.0f, 664.62f, 528.0f };
    const float frequency = clocks[(CCM_CBCMR >> 8) & 3] / (float)(((CCM_CBCMR >> 29) & 7) + 1);
    Serial.printf(" CCM_CBCMR=%08X (%.1f MHz)\n", CCM_CBCMR, frequency);
    memory_begin = (uint32_t *)(0x70000000);
    memory_end = (uint32_t *)(0x70000000 + size * 1048576);
    elapsedMillis msec = 0;
    if (!check_fixed_pattern(0x5A698421)) return;
    if (!check_lfsr_pattern(2976674124ul)) return;
    if (!check_lfsr_pattern(1438200953ul)) return;
    if (!check_lfsr_pattern(3413783263ul)) return;
    if (!check_lfsr_pattern(1900517911ul)) return;
    if (!check_lfsr_pattern(1227909400ul)) return;
    if (!check_lfsr_pattern(276562754ul)) return;
    if (!check_lfsr_pattern(146878114ul)) return;
    if (!check_lfsr_pattern(615545407ul)) return;
    if (!check_lfsr_pattern(110497896ul)) return;
    if (!check_lfsr_pattern(74539250ul)) return;
    if (!check_lfsr_pattern(4197336575ul)) return;
    if (!check_lfsr_pattern(2280382233ul)) return;
    if (!check_lfsr_pattern(542894183ul)) return;
    if (!check_lfsr_pattern(3978544245ul)) return;
    if (!check_lfsr_pattern(2315909796ul)) return;
    if (!check_lfsr_pattern(3736286001ul)) return;
    if (!check_lfsr_pattern(2876690683ul)) return;
    if (!check_lfsr_pattern(215559886ul)) return;
    if (!check_lfsr_pattern(539179291ul)) return;
    if (!check_lfsr_pattern(537678650ul)) return;
    if (!check_lfsr_pattern(4001405270ul)) return;
    if (!check_lfsr_pattern(2169216599ul)) return;
    if (!check_lfsr_pattern(4036891097ul)) return;
    if (!check_lfsr_pattern(1535452389ul)) return;
    if (!check_lfsr_pattern(2959727213ul)) return;
    if (!check_lfsr_pattern(4219363395ul)) return;
    if (!check_lfsr_pattern(1036929753ul)) return;
    if (!check_lfsr_pattern(2125248865ul)) return;
    if (!check_lfsr_pattern(3177905864ul)) return;
    if (!check_lfsr_pattern(2399307098ul)) return;
    if (!check_lfsr_pattern(3847634607ul)) return;
    if (!check_lfsr_pattern(27467969ul)) return;
    if (!check_lfsr_pattern(520563506ul)) return;
    if (!check_lfsr_pattern(381313790ul)) return;
    if (!check_lfsr_pattern(4174769276ul)) return;
    if (!check_lfsr_pattern(3932189449ul)) return;
    if (!check_lfsr_pattern(4079717394ul)) return;
    if (!check_lfsr_pattern(868357076ul)) return;
    if (!check_lfsr_pattern(2474062993ul)) return;
    if (!check_lfsr_pattern(1502682190ul)) return;
    if (!check_lfsr_pattern(2471230478ul)) return;
    if (!check_lfsr_pattern(85016565ul)) return;
    if (!check_lfsr_pattern(1427530695ul)) return;
    if (!check_lfsr_pattern(1100533073ul)) return;
    if (!check_fixed_pattern(0x55555555)) return;
    if (!check_fixed_pattern(0x33333333)) return;
    if (!check_fixed_pattern(0x0F0F0F0F)) return;
    if (!check_fixed_pattern(0x00FF00FF)) return;
    if (!check_fixed_pattern(0x0000FFFF)) return;
    if (!check_fixed_pattern(0xAAAAAAAA)) return;
    if (!check_fixed_pattern(0xCCCCCCCC)) return;
    if (!check_fixed_pattern(0xF0F0F0F0)) return;
    if (!check_fixed_pattern(0xFF00FF00)) return;
    if (!check_fixed_pattern(0xFFFF0000)) return;
    if (!check_fixed_pattern(0xFFFFFFFF)) return;
    if (!check_fixed_pattern(0x00000000)) return;
    Serial.printf(" test ran for %.2f seconds\n", (float)msec / 1000.0f);
    Serial.println("All PSRAM memory tests passed :-)");
    memory_ok = true;
  }
  else {
    Serial.println("NO PSRAM memory tested :-)");
    memory_ok = true;
  }
  delay(1000);

  /******************************************
    Flash Test
  *******************************************/
  Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
  Serial.println("QSPI Flash Memory Test");
  delay(5);

  if (!myfs.begin()) {
    Serial.printf("Error starting QSPI Disk");
    while (1)
      ;
  }
  Serial.printf("TotalSize (Bytes): %d\n", myfs.totalSize());
  delay(1000);

  Serial.println("Create files");
  myfs.mkdir("directory1");

  file = myfs.open("directory1/temp_test.txt", FILE_WRITE);
  delay(10);
  file.println("SOME DATA TO TEST");
  file.close();

  file = myfs.open("temp_test1.txt", FILE_WRITE);
  delay(10);
  file.println("The quick brown fox jumped over the lazy dogs back.");
  file.close();

  file = myfs.open("temp_test2.txt", FILE_WRITE);
  delay(10);
  file.println("SOME DATA TO TEST");
  file.close();

  printDirectory();

  File dataFile = myfs.open("temp_test1.txt");  // open the file.
  Serial.print("Print contents of temp_test1.txt:  ");

  if (dataFile) {  // if the file is available, Read from it:
    while (dataFile.available()) {
      Serial.write(dataFile.read());
    }
    dataFile.close();
  } else {
    Serial.println("error opening temptest1.txt");
  }

  Serial.printf("Disk Usage:\n");
  Serial.printf("Bytes Used: %llu, Bytes Total:%llu\n", myfs.usedSize(), myfs.totalSize());

  Serial.println();
  Serial.println("Erase Flash");
  myfs.format();
  printDirectory();
  Serial.printf("Disk Usage:\n");
  Serial.printf("Bytes Used: %llu, Bytes Total:%llu\n", myfs.usedSize(), myfs.totalSize());
}

bool fail_message(volatile uint32_t *location, uint32_t actual, uint32_t expected) {
  Serial.printf(" Error at %08X, read %08X but expected %08X\n",
                (uint32_t)location, actual, expected);
  return false;
}

// fill the entire RAM with a fixed pattern, then check it
bool check_fixed_pattern(uint32_t pattern) {
  volatile uint32_t *p;
  Serial.printf("testing with fixed pattern %08X\n", pattern);
  for (p = memory_begin; p < memory_end; p++) {
    *p = pattern;
  }
  arm_dcache_flush_delete((void *)memory_begin, (uint32_t)memory_end - (uint32_t)memory_begin);
  for (p = memory_begin; p < memory_end; p++) {
    uint32_t actual = *p;
    if (actual != pattern) return fail_message(p, actual, pattern);
  }
  return true;
}

// fill the entire RAM with a pseudo-random sequence, then check it
bool check_lfsr_pattern(uint32_t seed) {
  volatile uint32_t *p;
  uint32_t reg;

  Serial.printf("testing with pseudo-random sequence, seed=%u\n", seed);
  reg = seed;
  for (p = memory_begin; p < memory_end; p++) {
    *p = reg;
    for (int i = 0; i < 3; i++) {
      if (reg & 1) {
        reg >>= 1;
        reg ^= 0x7A5BC2E3;
      } else {
        reg >>= 1;
      }
    }
  }
  arm_dcache_flush_delete((void *)memory_begin,
                          (uint32_t)memory_end - (uint32_t)memory_begin);
  reg = seed;
  for (p = memory_begin; p < memory_end; p++) {
    uint32_t actual = *p;
    if (actual != reg) return fail_message(p, actual, reg);
    //Serial.printf(" reg=%08X\n", reg);
    for (int i = 0; i < 3; i++) {
      if (reg & 1) {
        reg >>= 1;
        reg ^= 0x7A5BC2E3;
      } else {
        reg >>= 1;
      }
    }
  }
  return true;
}
void printDirectory() {

  Serial.println("printDirectory\n--------------");
  printDirectory(myfs.open("/"), 0);
  Serial.println();
}
void printDirectory(File dir, int numTabs) {
  uint64_t fSize = 0;
  uint32_t dCnt = 0, fCnt = 0;
  if (0 == dir) {
    Serial.printf("\t>>>\t>>>>> No Dir\n");
    return;
  }
  while (true) {
    File entry = dir.openNextFile();
    if (!entry) {
      // no more files
      Serial.printf("\n %u dirs with %u files of Size %u Bytes\n", dCnt, fCnt, fSize);
      fTot += fCnt;
      totSize1 += fSize;
      break;
    }
    for (uint8_t i = 0; i < numTabs; i++) {
      Serial.print('\t');
    }

    if (entry.isDirectory()) {
      Serial.print("DIR\t");
      dCnt++;
    } else {
      Serial.print("FILE\t");
      fCnt++;
      fSize += entry.size();
    }
    Serial.print(entry.name());
    if (entry.isDirectory()) {
      Serial.println(" / ");
      printDirectory(entry, numTabs + 1);
    } else {
      // files have sizes, directories do not
      Serial.print("\t\t");
      Serial.println(entry.size(), DEC);
    }
    entry.close();
    //Serial.flush();
  }
}

void loop() {
  digitalWrite(13, HIGH);
  delay(100);
  if (!memory_ok) digitalWrite(13, LOW);  // rapid blink if any test fails
  delay(100);
}
/CODE]

Using above code :: Note changing to FASTEST WITH LTO gives these warnings:
[CODE]T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\LittleFS_NAND.cpp: In member function 'uint8_t LittleFS_SPINAND::addBBLUT(uint32_t)':
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\LittleFS_NAND.cpp:681:17: warning: variable 'firstOpenEntry' set but not used [-Wunused-but-set-variable]
  681 |         uint8_t firstOpenEntry = 0;
      |                 ^~~~~~~~~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\LittleFS_NAND.cpp: In member function 'uint8_t LittleFS_QPINAND::addBBLUT(uint32_t)':
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\LittleFS_NAND.cpp:1450:18: warning: variable 'pba' set but not used [-Wunused-but-set-variable]
 1450 |         uint16_t pba, lba;
      |                  ^~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\LittleFS_NAND.cpp:1450:23: warning: variable 'lba' set but not used [-Wunused-but-set-variable]
 1450 |         uint16_t pba, lba;
      |                       ^~~

And Worse Yet - then building FASTEST with NO LTO gives more extensive warnings list:
Code:
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c: In function 'lfs_dir_traverse.constprop':
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c: In function 'lfs_dir_compact':
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:754:42: warning: array subscript 'lfs_mdir_t {aka const struct lfs_mdir}[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  754 |         if (off+lfs_tag_dsize(ptag) < dir->off) {
      |                                       ~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:754:42: warning: array subscript 'lfs_mdir_t {aka const struct lfs_mdir}[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  754 |         if (off+lfs_tag_dsize(ptag) < dir->off) {
      |                                       ~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:754:42: warning: array subscript 'lfs_mdir_t {aka const struct lfs_mdir}[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  754 |         if (off+lfs_tag_dsize(ptag) < dir->off) {
      |                                       ~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:822:70: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  822 |                 int err = cb(data, LFS_MKTAG(LFS_TYPE_USERATTR + a[i].type,
      |                                                                  ~~~~^~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:19: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                   ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:53: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                     ^
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:293:72: note: in definition of macro 'LFS_MKTAG'
  293 |     (((lfs_tag_t)(type) << 20) | ((lfs_tag_t)(id) << 10) | (lfs_tag_t)(size))
      |                                                                        ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:823:65: warning: array subscript 'const struct lfs_attr[0]' is partly outside array bounds of 'struct lfs_diskoff[1]' [-Warray-bounds]
  823 |                         lfs_tag_id(tag) + diff, a[i].size), a[i].buffer);
      |                                                             ~~~~^~~~~~~
T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c:753:28: note: while referencing 'disk'
  753 |         struct lfs_diskoff disk;
      |                            ^~~~
Compiling library "SPI"
"T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O3 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -Wno-psabi -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=160 -DARDUINO=10819 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\TEMP\\arduino_build_570794/pch" "-IT:\\T_Drive\\arduino-1.8.19\\hardware\\teensy\\avr\\cores\\teensy4" "-IT:\\T_Drive\\arduino-1.8.19\\hardware\\teensy\\avr\\libraries\\LittleFS\\src" "-IT:\\T_Drive\\arduino-1.8.19\\hardware\\teensy\\avr\\libraries\\SPI" "T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy\\avr\\libraries\\SPI\\SPI.cpp" -o "T:\\TEMP\\arduino_build_570794\\libraries\\SPI\\SPI.cpp.o"
Compiling core...
Using precompiled core: T:\TEMP\arduino_cache_54489\core\core_fbaf3cc09a6812b07e339698e1d55848.a
Linking everything together...
"T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -O3 -Wl,--gc-sections,--relax "-TT:\\T_Drive\\arduino-1.8.19\\hardware\\teensy\\avr\\cores\\teensy4/imxrt1062_t41.ld" -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -o "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.elf" "T:\\TEMP\\arduino_build_570794\\sketch\\KH_16MBpsramTst.ino.cpp.o" "T:\\TEMP\\arduino_build_570794\\libraries\\LittleFS\\LittleFS.cpp.o" "T:\\TEMP\\arduino_build_570794\\libraries\\LittleFS\\LittleFS_NAND.cpp.o" "T:\\TEMP\\arduino_build_570794\\libraries\\LittleFS\\littlefs\\lfs.c.o" "T:\\TEMP\\arduino_build_570794\\libraries\\LittleFS\\littlefs\\lfs_util.c.o" "T:\\TEMP\\arduino_build_570794\\libraries\\SPI\\SPI.cpp.o" "T:\\TEMP\\arduino_build_570794/..\\arduino_cache_54489\\core\\core_fbaf3cc09a6812b07e339698e1d55848.a" "-LT:\\TEMP\\arduino_build_570794" -larm_cortexM7lfsp_math -lm -lstdc++
"T:\\T_Drive\\arduino-1.8.19\\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 "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.elf" "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.eep"
"T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.elf" "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.hex"
"T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/teensy_secure" encrypthex TEENSY41 "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.hex"
encrypting 104448 bytes to T:\TEMP\arduino_build_570794/KH_16MBpsramTst.ino.ehex
"T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/teensy_post_compile" -file=KH_16MBpsramTst.ino "-path=T:\\TEMP\\arduino_build_570794" "-tools=T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/" -board=TEENSY41
"T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/stdout_redirect" "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.sym" "T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -t -C "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.elf"
"T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/teensy_size" "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.elf"
Memory Usage on Teensy 4.1:
  FLASH: code:94432, data:9936, headers:8268   free for files:8013828
   RAM1: variables:9440, code:88696, padding:9608   free for local variables:416544
   RAM2: variables:12416  free for malloc/new:511872
"T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/stdout_redirect" "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.lst" "T:\\T_Drive\\arduino-1.8.19\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -d -S -C "T:\\TEMP\\arduino_build_570794/KH_16MBpsramTst.ino.elf"
Using library LittleFS at version 1.0.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\LittleFS
Using library SPI at version 1.0 in folder: T:\T_Drive\arduino-1.8.19\hardware\teensy\avr\libraries\SPI
 
Last edited:
Calling the regular format() function with type=0 performs a quickformat (which just so happens to be the default argument).
 
Calling the regular format() function with type=0 performs a quickformat (which just so happens to be the default argument).
Quite right you are!
Odd though individually they support the QUICK call - but not the collective shared one.
Replacing Ken's altered sketch in post above.
 
Confirmed @defragster test with fastest
> - then building FASTEST with NO LTO gives more extensive warnings list

the errors seem to be coming from lfs.c so not sure there is much you are going to be able to do with that. Know that they are working on a updated version.

Calling the regular format() function with type=0 performs a quickformat (which just so happens to be the default argument).
which is strange. that it doesn't work. Using faster to compile. The error I am seeing is coming from:

Code:
error: 'class FS' has no member named 'quickFormat'

Ok not really. FS.h does not contain a virtual function for quickFormat. Solution add the following to FS.h

C++:
virtual bool quickFormat() {
    return false;
  }
 
Ok not really. FS.h does not contain a virtual function for quickFormat. Solution add the following to FS.h

C++:
virtual bool quickFormat() {
    return false;
  }
I don't see what that is meant to achieve, it just adds an unneeded virtual method to the FS class.

class FS doesn't need to expose quickFormat() because it already has a format() method with a type parameter.
LittleFS_QSPI directs that method to whichever underlying LittleFS class is mounted, which will be of type LittleFS_QSPIFlash or LittleFS_QPINAND.
Both of these inherit from the LittleFS base class which directs format() to either quickFormat() or lowLevelFormat() depending on the type argument.

tl:dr; use "format(0)", not "quickFormat()" because that is an internal LittleFS function, not a FS function.
 
format(0)", not "quickFormat()" because that is an internal LittleFS function, not a FS function.
Note format is also a virtual function in FS.h so doesn;t much matter about that. quickFormat was always meant to be a shortcut to format(0.... Its an option like anyother - matter of preference I guess. PS - its always been there since day 1 of LittleFS. Not sure why its doenst work all of a sudden.
 
Why are you saying it isn't working? LittleFS_QSPI is a FS-based object, it does not inherit LittleFS directly. If you want access to the underlying LittleFS object that it contains, that's what fs() is for... but the whole idea of the FS class is to move away from relying on filesystem specific calls.
 
Thanks to @jmarsh and @defragster for fixing up my memory test program. It was cobbled together back in the early days of rapid Flash development on Teensy 4.1 and I was blissfully unaware of the LittleFS_QSPI object coming along at some point.

Verified that it worked with both NOR and NAND Flash that were previously tested with 8 and 16MB PSRAM.

Since there was some discussion about formatting, I then tried testing it with a new unformatted 2Gb NAND chip and 8MB PSRAM and it passed at the default Faster compile setting.

I then ran another new board also with an unformatted NAND flash and 8MB PSRAM with the Fastest compile setting and it failed
Code:
"QSPI Flash Memory Test
Error starting QSPI DiskPSRAM Memory Test, 8 Mbyte"

Downloaded the same compiled .hex to same board by pushing the Program button and it then passed!??

Took yet another new unformatted board with same configuration and downloaded the same .hex and it passed.

I then did a simple recompile (didn't force a complete recompile) with the same settings and board and it failed with
Code:
"QSPI Flash Memory Test
Error starting QSPI Disk"

Downloaded same .hex 3 more times to same board and it failed the same each time.
Recompiled with same settings - Failed
Forced a full recompile with same settings - Failed.
Set compiler to Faster - Passed.
Set compiler to Fastest - Failed.
Set compiler to Faster - Passed.

Really not too sure what to make of all that with the Fastest compiler setting, especially having the same .hex not work and then work on the same board with only a new download unless the same .hex image can shift in memory between downloads and step on something it shouldn't?

I usually only use the default Faster compiler setting in my testing and have never seen this issue, so not sure if this is something new or perhaps has always been there with the Fastest compiler setting.
 
is there no MacOS installer for beta?

Teensyduino 1.59 was the last version to support (the old Java-based) Arduino IDE 1.8.x on MacOS. Future MacOS support will be only for Arduino IDE 2.0.4 or later, using install by Arduino's Boards Manager.

We will continue supporting the old IDE on Windows and Linux, though for how long is uncertain. If Microsoft or the major Linux distros make substantial changes to their systems which break Java 8 or the installer process, you can be pretty sure such changes would spell the end of support for the Java-based IDE.

Apple has made many changes over the years which make Java and the installer harder and harder to develop and maintain. The straw that broke the camel's back was stopping support for Apple Notarization with "altool". Now Notarization must be performed with "notarytool" in Xcode 13 or later. Xcode 13 requires at least MacOS 11.3 (Big Sur). Apple did publish a copy of notarytool compatible back to 10.15 (Catalina). Unfortunately the build process I've used for so many years to create the installer doesn't work on MacOS newer than 10.14 (Mojave). I kept an old Mac on Mojave specifically to build the installer for ancient MacOS and a complete pre-insetalled old IDE and do the signature and Notarization for newer MacOS, until Apple's "altool" stopped working on Mojave.

Even if I were to find a workaround or bring up a completely new way to build the old IDE stuff on modern MacOS, even more difficult changes from Apple are on the horizon. Future MacOS is expected to drop support for Intel-based Mac and also Rosetta 2 to run Intel x86-64 binaries. Those old Arduino IDE versions are from before Apple switched to ARM, so of course everything is compiled only for Intel processors. They also contain the Java 8 JRE which Oracle acquired from Sun Microsystems, and then changed the licensing terms. Running in Apple's Rosetta-free future would require replacing the JRE with one built for Apple Silicon. This could theoretically be done with OpenJDK, but that project has Java 8 as EOL. Support for Apple Silicon in such an old version is uncertain. I've seen mention of 3rd party builds, so maybe modifying the old IDE to run on future MacOS could be theoretically possible, but Arduino isn't updating the 1.8.x versions anymore. They have commits on github which were never released as 1.8.20, so it seems highly unlikely Arduino won't do such a difficult update to the old version. As far as I know, no community projects are actively maintaining the old IDE with ambitious efforts like migrating to newer Java APIs. I'm certainly not going to go down that path!

While the old IDE is likely to keep working on Windows and Linux, with OpenJDK ending Java 8 support in 2026 and Oracle years ago switching to restrictive licensing (for the JRE which ships in every copy of the old IDE), the writing is on the wall for the old Arduino IDE to eventually break on Windows and Linux too.
 
Last edited:
something new or perhaps has always been there with the Fastest compiler setting
Not played with the variety of OPT lately - or much else - but those warnings pop differently between LTO and NON_LTO - so maybe the resulting induced behavior is the problem? That's why I posted the warnings (and repro sketch). That may be from change in ToolChain?

@Paul does a (random?) variety of builds to catch warnings? Not sure if this is new 'warning' behavior or it just wasn't observed? Esp since the one long WARN list was from unchanged LittleFS source file?
 
The LittleFS warnings are my fault. I commented out many Serial.print lines in the NAND flash file, but some local variables were computed only for the sake of that debug printing. It worked fine. But I had verbose output turned on, so the warnings scrolled by and I didn't notice until nearly done with 1.60-beta5 testing (I run 18 programs on specific Teensy boards to make sure the most commonly used libraries are all working). I decided to just go ahead with publishing 1.60-beta5 and fix those annoying but harmless warnings later.

I do have a Perl script that tries to compile all the examples from all libraries. But I haven't run it since switching my Linux machine from Ubuntu to Fedora and from Intel to AMD. It's going to need some maintenance because my former system had a dedicated Intel Optane drive that script used for the temporary compile folders. I might still take that old machine apart and rescue that drive, but that too is complicated since it's U.2 not M.2 form factor. One way or another, I'll get the sctipt running well before a final 1.60 release. But for now I'm just running the 18 manual tests, and of course using the latest as I answer questions and work on projects.

I also really wanted to get installers and Boards Manager support published for the new PSRAM chip. I lost a week and really wanted to get this pushed before more people get those new memory chips.
 
dedicated Intel Optane drive
Aren't those just another SSD - small in size and fail taking the system down when used as intended for boot speedup?
I put a second SSD in this build for TEMP - given how slow IDE 2 builds it doesn't seem to have helped - though IDE 1 builds a few times faster last I looked when building a @KenHahn example for one of his 'use all the T_4.1 pins' PCB's - some tolerable seconds versus painful minutes.
 
Back
Top