Teensyduino 1.55 Released

Status
Not open for further replies.
Paul, yes I bet the majority is happy. Not me, but that's bad luck.

I'm not particularly happy about it either, as I do sometimes use the .lst files.

Again, I'm hopeful to find a way to bring this feature back in future versions. I personally want to have it back. But I'm not willing to make it the default for everyone unless it can be done in a way that doesn't stall builds for a long time with larger code.
 
How large was the large test and how many % of programs is that large?
...

This code was about 1MB in Flash. And was specifically designed to consume flash. It ran from Flash and was machine written code that cascaded 4,000 literal calls - like but instead of recursion for the purpose of running large code from FLASH to test the Encrypted code Beta Teensy Bootloader. It doesn't matter it ran from Flash - though that code would not have fit in RAM.
Code:
teensy_size: Memory Usage on Teensy 4.0:
teensy_size:   [B]FLASH: code:995464, data:326496[/B], headers:8212   free for files:701444
teensy_size:    RAM1: variables:90848, code:38008, padding:27528   free for local variables:367904
teensy_size:    RAM2: variables:12384  free for malloc/new:511904

So it did emulate an excessively large program too big for RAM1 ITCM - especially with it having a large amount of data in FLASH as well.

When it took 2.5 minutes to upload I spent over an hour revamping my Windows computer to have a RAM drive for TEMP and other alterations - none of which helped cut that time. And with the 1.5 minutes of time not showing in console after 'build' was complete and teensy_size reported usage there was no idea what was happeneing until Paul indicated it was the .lst creation.
 
All is good. I have a backup of that file now. And I found that I can disable encryption. That saves some 100 milliseconds.
 
@all - Not sure if this is the right place to post this. Anyway I just did a complete reinstall of Ubuntu 20.04. I installed Arduino 1.8.16 and TD 1.55 final. I compiled diskIOMB.ino without a problem but now it will not recognize the QPINAND device on the T4.1. So I compiled and tested it on my laptop with TD 1.55B2 and it see's and lists the QPINAND chip. Then I compiled the LittleFS Listfiles.ino modified to list the files on the QPINAND device. It failed with TD1.55 but worked with TD 1.55B2.

Output of failure:
Code:
Initializing QPINAND Chip
couldn't mount media, attemping to format
format failed :(
initialization failed!

Here is the modified Listfiles.ino sketch:
Code:
// Print a list of all files stored on a flash memory chip

#include <LittleFS.h>


// Flash chip on Teensy Audio Shield or Prop Shield
//LittleFS_SPIFlash myfs;
LittleFS_QPINAND myfs;

const int chipSelect = 3;


void setup() {
  //Uncomment these lines for Teensy 3.x Audio Shield (Rev C)
  //SPI.setMOSI(7);  // Audio shield has MOSI on pin 7
  //SPI.setSCK(14);  // Audio shield has SCK on pin 14  
  
  // Open serial communications and wait for port to open:
  Serial.begin(9600);
  while (!Serial) { ; // wait for Arduino Serial Monitor
  }

  Serial.println("Initializing QPINAND Chip");

//  if (!myfs.begin(chipSelect)) {
  if (!myfs.begin()) {
    Serial.println("initialization failed!");
    return;
  }

  Serial.print("Space Used = ");
  Serial.println(myfs.usedSize());
  Serial.print("Filesystem Size = ");
  Serial.println(myfs.totalSize());

  printDirectory(myfs);
}


void loop() {
}


void printDirectory(FS &fs) {
  Serial.println("Directory\n---------");
  printDirectory(fs.open("/"), 0);
  Serial.println();
}

void printDirectory(File dir, int numSpaces) {
   while(true) {
     File entry = dir.openNextFile();
     if (! entry) {
       //Serial.println("** no more files **");
       break;
     }
     printSpaces(numSpaces);
     Serial.print(entry.name());
     if (entry.isDirectory()) {
       Serial.println("/");
       printDirectory(entry, numSpaces+2);
     } else {
       // files have sizes, directories do not
       printSpaces(36 - numSpaces - strlen(entry.name()));
       Serial.print("  ");
       Serial.println(entry.size(), DEC);
     }
     entry.close();
   }
}

void printSpaces(int num) {
  for (int i=0; i < num; i++) {
    Serial.print(" ");
  }
}

Copied LittleFS from TD1.55B2 to TD 1.55 final. Still fails with same message.

EDIT: Also fails with QSPI.ino in the Integrity folder:
Code:
LittleFS Test : File Integrity
couldn't mount media, attemping to format                                                          
format failed :(                                                                                   
Error starting QSPI_NAND
 
Last edited:
@all - Not sure if this is the right place to post this. Anyway I just did a complete reinstall of Ubuntu 20.04. I installed Arduino 1.8.16 and TD 1.55 final. I compiled diskIOMB.ino without a problem but now it will not recognize the QPINAND device on the T4.1. So I compiled and tested it on my laptop with TD 1.55B2 and it see's and lists the QPINAND chip. Then I compiled the LittleFS Listfiles.ino modified to list the files on the QPINAND device. It failed with TD1.55 but worked with TD 1.55B2.

Output of failure:
Code:
Initializing QPINAND Chip
couldn't mount media, attemping to format
format failed :(
initialization failed!
...
[/QUOTE]

Using a T_4.1 with a NAND Flash it worked here to show the last files that media held from an Integrity test.
 > Win 11, IDE 1.8.16 and TD 1.55

Only change was the [U]first line output showing SRC sketch name and compile time[/U]
[CODE][U]C:\T_Drive\tCode\littleFS\QSPI_NANDlist\QSPI_NANDlist.ino Sep 18 2021 14:25:14[/U]
Initializing QPINAND Chip
Space Used = 3801088
Filesystem Size = 131596288
Directory
---------
1_dir/
  B_file.txt                          2536
  C_file.txt                          3048
  D_file.txt                          7120
2_dir/
  A_file.txt                          21432
  D_file.txt                          10680
  E_file.txt                          12216
3_dir/
  A_file.txt                          14288
  B_file.txt                          7608
  C_file.txt                          9144
4_dir/
  C_file.txt                          6096
  D_file.txt                          7120
  E_file.txt                          8144
5_dir/
  A_file.txt                          7144
  E_file.txt                          4072
A_file.txt                            7144
B_file.txt                            5072
E_file.txt                            4072

Returned to this working ...\hardware\teensy\avr\libraries\LittleFS\examples\Integrity\QSPI\QSPI.ino changed to NAND {#define TEST_QSPI_NAND // NAND Flash}, did a Quick format and changed files.
Back to the above and it works:
Code:
[U]C:\T_Drive\tCode\littleFS\QSPI_NANDlist\QSPI_NANDlist.ino Sep 18 2021 14:33:57[/U]
Initializing QPINAND Chip
Space Used = 71041024
Filesystem Size = 131596288
Directory
---------
[B]0_2MBfile.txt                         2048000
0_bigfile.txt                         65513472
[/B]1_dir/
  E_file.txt                          4072
2_dir/
  A_file.txt                          7144
  B_file.txt                          2536
3_dir/
  C_file.txt                          3048
  D_file.txt                          3560
4_dir/
  A_file.txt                          14288
  B_file.txt                          5072
  C_file.txt                          6096
  D_file.txt                          7120
  E_file.txt                          8144
5_dir/
  B_file.txt                          2536
  C_file.txt                          3048
B_file.txt                            2536
C_file.txt                            3048
 
@all - Not sure if this is the right place to post this. Anyway I just did a complete reinstall of Ubuntu 20.04. I installed Arduino 1.8.16 and TD 1.55 final. I compiled diskIOMB.ino without a problem but now it will not recognize the QPINAND device on the T4.1. So I compiled and tested it on my laptop with TD 1.55B2 and it see's and lists the QPINAND chip. Then I compiled the LittleFS Listfiles.ino modified to list the files on the QPINAND device. It failed with TD1.55 but worked with TD 1.55B2.

Output of failure:
Code:
Initializing QPINAND Chip
couldn't mount media, attemping to format
format failed :(
initialization failed!

Here is the modified Listfiles.ino sketch:
Code:
// Print a list of all files stored on a flash memory chip
.....

Copied LittleFS from TD1.55B2 to TD 1.55 final. Still fails with same message.

EDIT: Also fails with QSPI.ino in the Integrity folder:
Code:
LittleFS Test : File Integrity
couldn't mount media, attemping to format                                                          
format failed :(                                                                                   
Error starting QSPI_NAND

I don't have a T4.1 with a NAND chip soldered on the bottom but I do have a QSPI test board that I put together to test the different chips that could go on via QSPI. Ran your test sketch with a NAND chip (M02) and it seems to be working:
Code:
Initializing QPINAND Chip
Space Used = 262144
Filesystem Size = 265289728
Directory
---------
datalog.txt                           154

I tested this with the IDE 1.8.16 with TD1.55. Maybe a bad install of 1.55?
 
Figured it out. I had "optimizations:" set to Fastest. I changed from that to Fast, Faster, Smallest Code and with each of those settings QPINAND will mount. Not sure why the Fastest setting is failing. I checked TD1.55B2 and when I set that to Fastest it failed to mount QPINAND as well. Apparently I had not tried that optimization before.

Why, I have no idea:)
 
Figured it out. I had "optimizations:" set to Fastest. I changed from that to Fast, Faster, Smallest Code and with each of those settings QPINAND will mount. Not sure why the Fastest setting is failing. I checked TD1.55B2 and when I set that to Fastest it failed to mount QPINAND as well. Apparently I had not tried that optimization before.

Why, I have no idea:)

Arrgggh. Yeah - early Beta on 4.0 suggested weird things happen - not using 'default : Faster' gave odd results - except 'debug' worked it seemed - so never tried much of the others. And the LTO that could be good on T_3.6 didn't seem to do well either.

Maybe when the toolchains are jumped, that would be worth looking into ... maybe they'll work then?
 
Arrgggh. Yeah - early Beta on 4.0 suggested weird things happen - not using 'default : Faster' gave odd results - except 'debug' worked it seemed - so never tried much of the others. And the LTO that could be good on T_3.6 didn't seem to do well either.

Maybe when the toolchains are jumped, that would be worth looking into ... maybe they'll work then?

That was the reason I started with a fresh install of Ubuntu 20.04 from 18.04. But even with using the Fastest optimization 18.04 and TD1.55Bx QPINAND would not mount. I checked that on my other desktop and my laptop. I guess I had not used the Fastest optimization at that point. Wonder if it's the same for Windows?
 
That was the reason I started with a fresh install of Ubuntu 20.04 from 18.04. But even with using the Fastest optimization 18.04 and TD1.55Bx QPINAND would not mount. I checked that on my other desktop and my laptop. I guess I had not used the Fastest optimization at that point. Wonder if it's the same for Windows?

Yep tested it a littler while ago - works with FASTER but not FASTEST - didn't try the other settings.
 
Yep tested it a littler while ago - works with FASTER but not FASTEST - didn't try the other settings.

Well I just couldn't leave it alone. I was getting curious about the failure. Probably not a real issue at this time. So I spent most of the day tracking down where the failure happened and came up with this in lfs_commit_dir_crc():
Code:
lfs_dir_commitcrc -> crc [COLOR="#FF0000"]0xaf9eb431[/COLOR]
lfs_dir_commitcrc -> crc1 [COLOR="#FF0000"]0x277ea2a1[/COLOR]
lfs_dir_commitcrc -> i 0x2c
lfs_dir_commitcrc -> off1 0x2c

This check starts at line #1325:
Code:
if (i == off1 && crc != crc1)

Both i and off1 are equal but not crc or crc1. At that point my brain blew apart:)

Gave it up knowing the problem might be anywhere else than here. This just for reference.

Edit: It returned error code -84 (LFS_ERR_CORRUPT).
 
Last edited:
Hello,

I just tried to launch teensyduino 1.55 on osx 12.0.1 and it doesn't work, it just open a new empty windows.
I allowed the app to run in security and privacy and give the full disk accces.


Regard,

bzaz31
 
Teensyduino 1.55 doesn't work with MAC OS Monterey 12.0.1. ?

The MAC tell me:
" This software needs to be updated. Contact the developer for more information."
after confirming this message I get this BOX (screenshot image) and nothing happens:

Bildschirmfoto 2021-11-21 um 20.31.45.png
Can someone help me?
 
The other one supports higher version numbers where the security req's changed AFAIK .. Macintosh OS Software (10.10 - 11.x)

It is IDE and TD ALL-IN-ONE
 
Status
Not open for further replies.
Back
Top