Forum Rule: Always post complete source code & details to reproduce any issue!
Page 12 of 24 FirstFirst ... 2 10 11 12 13 14 22 ... LastLast
Results 276 to 300 of 588

Thread: Teensyduino File System Integration, including MTP and MSC

  1. #276
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    Is there a simple example which I can just start to copy some files to a littlfs QSPI Flash?

    Thx

  2. #277
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    Datalogger does not work. Do I have to update something?
    C:\temp\arduino_modified_sketch_480790\LittleFS_QS PI_Simple_Datalogger.ino Oct 14 2021 20:35:37
    Initializing LittleFS ...Error starting QSPI FLASH

    Chip: W25Q512JV*IM (DTR)
    T4 with chip soldered, from Paul

  3. #278
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,734
    Quote Originally Posted by Frank B View Post
    Is there a simple example which I can just start to copy some files to a littlfs QSPI Flash?

    Thx
    Not sure on if the question is using MTP or not... But with MTP you could do something like:
    Code:
    #include <SD.h>
    #include <LittleFS.h>
    #include <MTP_Teensy.h>
    
    #define DBGSerial Serial
    
    MTPStorage storage;     // TODO: storage inside MTP instance, not separate class
    MTPD    MTP(&storage);  // TODO: MTP instance created by default
    
    LittleFS_QSPIFlash qspiflash;
    LittleFS_QPINAND   qspinand;
    
    void setup()
    {
      DBGSerial.begin(9600);
      while (!DBGSerial && millis() < 5000) {
        // wait for serial port to connect.
      }
    
      DBGSerial.print(CrashReport);
      DBGSerial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
      delay(1000);
    
      // mandatory to begin the MTP session.
      MTP.begin();
      
      // try to add QSPI Flash
      if (qspiflash.begin()) {
        storage.addFilesystem(qspiflash, "QSPI Flash");
        DBGSerial.println("Added QSPI Flash");
      } else if (qspinand.begin()) {
        storage.addFilesystem(qspinand, "QSPI NAND");
        DBGSerial.println("Added QSPI Nand");
      } else {
        DBGSerial.println("No QSPI Flash found");
      }
      DBGSerial.println("\nSetup done");
    }
    
    
    void loop()
    {
      if ( DBGSerial.available() ) {
        uint8_t command = DBGSerial.read();
    
        uint32_t fsCount;
        switch (command) {
          case '1':
            // first dump list of storages:
            fsCount = storage.getFSCount();
            DBGSerial.printf("\nDump Storage list(%u)\n", fsCount);
            for (uint32_t ii = 0; ii < fsCount; ii++) {
              DBGSerial.printf("store:%u storage:%x name:%s fs:%x\n", ii, MTP.Store2Storage(ii),
                               storage.getStoreName(ii), (uint32_t)storage.getStoreFS(ii));
            }
            DBGSerial.println("\nDump Index List");
            storage.dumpIndexList();
            break;
          case'r':
            DBGSerial.println("Reset");
            MTP.send_DeviceResetEvent();
            break;
    
          case '\r':
          case '\n':
          case 'h': menu(); break;
        }
        while (DBGSerial.read() != -1) ; // remove rest of characters.
      } else {
        MTP.loop();
        //#if USE_MSC > 0
        //usbmsc.checkUSBStatus(false);
        //#endif
      }
    }
    
    void menu()
    {
      DBGSerial.println();
      DBGSerial.println("Menu Options:");
      DBGSerial.println("\t1 - List Drives (Step 1)");
      DBGSerial.println("\tr - Reset MTP");
      DBGSerial.println();
    }
    Could still be simplified and remove some of the simple things like listing the drives as you have 0 or 1, and reset command,

    Note: I am trying to put together a LittleFS_QSPI object which sort of does the above of define both and use the first one whose begin works...

  4. #279
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    Yes, it was a mtp question .. but then i thought i just try the the logger example

    So, it's not surprising that your code (Thank you!) does not work too.

    Prints:
    Code:
    No QSPI Flash found

    Ok.. when I connected the T4, it had Pauls testprogram flashed which showed a working QSPI. (Got it long ago, never connected it...)
    I guess I have to update something.. but..what?

  5. #280
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,670
    Quote Originally Posted by Frank B View Post
    Datalogger does not work. Do I have to update something?
    C:\temp\arduino_modified_sketch_480790\LittleFS_QS PI_Simple_Datalogger.ino Oct 14 2021 20:35:37
    Initializing LittleFS ...Error starting QSPI FLASH

    Chip: W25Q512JV*IM (DTR)
    T4 with chip soldered, from Paul
    Seems to be working for me:
    Code:
    C:\Users\Merli\AppData\Local\Temp\arduino_modified_sketch_834447\LittleFS_QSPI_Simple_Datalogger.ino Oct 14 2021 14:56:12
    Initializing LittleFS ...LittleFS initialized.
    
    Menu Options:
    	l - List files on disk
    	e - Erase files on disk
    	s - Start Logging data (Restarting logger will append records to existing log)
    	x - Stop Logging data
    	d - Dump Log
    	h - Menu
    Know this is may seem like an obvious question but did you remember to swtich from:
    Code:
    LittleFS_QPINAND myfs
    to
    Code:
    LittleFS_QSPIFlash myfs
    That is the only thing I changed in the example.

  6. #281
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    Yup,
    LittleFS_QSPIFlash myfs

    Hm. The board worked 15 minutes ago with the Paul's pre-flashed test. So it can't be a hardware problem.

  7. #282
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    Sorry for hijacking this thread.. feel free to move my question elsewhere.

    To be sure to have the official 1.53b I installed everything to a ramdisk on A:
    No other update, and good old GCC5:

    Code:
    "A:\\hardware\\teensy/../tools/teensy_post_compile" -file=LittleFS_QSPI_Simple_Datalogger.ino "-path=C:\\temp\\arduino_build_897140" "-tools=A:\\hardware\\teensy/../tools/" -board=TEENSY41
    Opening Teensy Loader...
    "A:\\hardware\\teensy/../tools/stdout_redirect" "C:\\temp\\arduino_build_897140/LittleFS_QSPI_Simple_Datalogger.ino.symnm" "A:\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc-nm" -n -S --defined-only -C "C:\\temp\\arduino_build_897140/LittleFS_QSPI_Simple_Datalogger.ino.elf"
    "A:\\hardware\\teensy/../tools/teensy_size" "C:\\temp\\arduino_build_897140/LittleFS_QSPI_Simple_Datalogger.ino.elf"
    Memory Usage on Teensy 4.1:
      FLASH: code:66000, data:8592, headers:8348   free for files:8043524
       RAM1: variables:8960, code:60232, padding:5304   free for local variables:449792
       RAM2: variables:12384  free for malloc/new:511904
    "A:\\hardware\\teensy/../tools/stdout_redirect" "C:\\temp\\arduino_build_897140/LittleFS_QSPI_Simple_Datalogger.ino.lst" "A:\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -d -S -C "C:\\temp\\arduino_build_897140/LittleFS_QSPI_Simple_Datalogger.ino.elf"
    Bibliothek LittleFS in Version 1.0.0 im Ordner: A:\hardware\teensy\avr\libraries\LittleFS  wird verwendet
    Bibliothek SPI in Version 1.0 im Ordner: A:\hardware\teensy\avr\libraries\SPI  wird verwendet
    Ok.
    Can it be something else?
    Do I have to format it? (How?)

  8. #283
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,670
    Quote Originally Posted by Frank B View Post
    Yup,
    LittleFS_QSPIFlash myfs

    Hm. The board worked 15 minutes ago with the Paul's pre-flashed test. So it can't be a hardware problem.
    Just for a sanity check I just plugged in the original T4.1beta board and sketch still runs so thats on 2 boards.. Did you try loading it again? Maybe something screwy happened? Maybe you have an old version of LittleFS - note just taking stabs in the dark?

  9. #284
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    9,734
    Quote Originally Posted by Frank B View Post
    Yup,
    LittleFS_QSPIFlash myfs

    Hm. The board worked 15 minutes ago with the Paul's pre-flashed test. So it can't be a hardware problem.
    If it were me, I would probably go into LittleFS.cpp and uncomment some of the Serial.print statements in the begin method and see
    if it is finding data or not...

    Maybe it is finding it is a different ID or maybe not quad SPI or ???

  10. #285
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,670
    @Frank B
    Here is the sketch I am running and my compile results unfortunately I am running 1.56beta2 - 1.53 is old you sure thats right - maybe update to 1.55 at least but still should work?

    Code:
    /*
      LittleFS  datalogger
     
     This example shows how to log data from three analog sensors
     to an storage device such as a FLASH.
     
     This example code is in the public domain.
     */
    #include <LittleFS.h>
    
    // LittleFS supports creating file systems (FS) in multiple memory types.  Depending on the 
    // memory type you want to use you would uncomment one of the following constructors
    
    LittleFS_QSPIFlash myfs;  // Used to create FS on QSPI NOR flash chips located on the bottom of the T4.1 such as the W25Q16JV*IQ/W25Q16FV,  for the full list of supported NOR flash see https://github.com/PaulStoffregen/LittleFS#nor-flash
    //LittleFS_QPINAND myfs;  // Used to create FS on QSPI NAND flash chips located on the bottom of the T4.1 such as the W25N01G. for the full list of supported NAND flash see  https://github.com/PaulStoffregen/LittleFS#nand-flash
    
    File dataFile;  // Specifes that dataFile is of File type
    
    int record_count = 0;
    bool write_data = false;
    
    void setup()
    {
    
      // Open serial communications and wait for port to open:
      Serial.begin(115200);
      while (!Serial) {
        // wait for serial port to connect.
      }
      Serial.println("\n" __FILE__ " " __DATE__ " " __TIME__);
    
      Serial.print("Initializing LittleFS ...");
    
      // see if the Flash is present and can be initialized:
      if (!myfs.begin()) {
        Serial.printf("Error starting %s\n", "QSPI FLASH");
        while (1) {
          // Error, so don't do anything more - stay stuck here
        }
      }
      Serial.println("LittleFS initialized.");
      
      menu();
      
    }
    
    void loop()
    { 
      if ( Serial.available() ) {
        char rr;
        rr = Serial.read();
        switch (rr) {
          case 'l': listFiles(); break;
          case 'e': eraseFiles(); break;
          case 's':
            {
              Serial.println("\nLogging Data!!!");
              write_data = true;   // sets flag to continue to write data until new command is received
              // opens a file or creates a file if not present,  FILE_WRITE will append data to
              // to the file created.
              dataFile = myfs.open("datalog.txt", FILE_WRITE);
              logData();
            }
            break;
          case 'x': stopLogging(); break;
          case 'd': dumpLog(); break;
          case '\r':
          case '\n':
          case 'h': menu(); break;
        }
        while (Serial.read() != -1) ; // remove rest of characters.
      } 
    
      if(write_data) logData();
    }
    
    void logData()
    {
        // make a string for assembling the data to log:
        String dataString = "";
      
        // read three sensors and append to the string:
        for (int analogPin = 0; analogPin < 3; analogPin++) {
          int sensor = analogRead(analogPin);
          dataString += String(sensor);
          if (analogPin < 2) {
            dataString += ",";
          }
        }
      
        // if the file is available, write to it:
        if (dataFile) {
          dataFile.println(dataString);
          // print to the serial port too:
          Serial.println(dataString);
          record_count += 1;
        } else {
          // if the file isn't open, pop up an error:
          Serial.println("error opening datalog.txt");
        }
        delay(100); // run at a reasonable not-too-fast speed for testing
    }
    
    void stopLogging()
    {
      Serial.println("\nStopped Logging Data!!!");
      write_data = false;
      // Closes the data file.
      dataFile.close();
      Serial.printf("Records written = %d\n", record_count);
    }
    
    
    void dumpLog()
    {
      Serial.println("\nDumping Log!!!");
      // open the file.
      dataFile = myfs.open("datalog.txt");
    
      // if the file is available, write to it:
      if (dataFile) {
        while (dataFile.available()) {
          Serial.write(dataFile.read());
        }
        dataFile.close();
      }  
      // if the file isn't open, pop up an error:
      else {
        Serial.println("error opening datalog.txt");
      } 
    }
    
    void menu()
    {
      Serial.println();
      Serial.println("Menu Options:");
      Serial.println("\tl - List files on disk");
      Serial.println("\te - Erase files on disk");
      Serial.println("\ts - Start Logging data (Restarting logger will append records to existing log)");
      Serial.println("\tx - Stop Logging data");
      Serial.println("\td - Dump Log");
      Serial.println("\th - Menu");
      Serial.println();
    }
    
    void listFiles()
    {
      Serial.print("\n Space Used = ");
      Serial.println(myfs.usedSize());
      Serial.print("Filesystem Size = ");
      Serial.println(myfs.totalSize());
    
      printDirectory(myfs);
    }
    
    void eraseFiles()
    {
      myfs.quickFormat();  // performs a quick format of the created di
      Serial.println("\nFiles erased !");
    }
    
    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(" ");
      }
    }
    And
    Code:
    F:\arduino-1.8.16\arduino-builder -dump-prefs -logger=machine -hardware F:\arduino-1.8.16\hardware -hardware C:\Users\Merli\AppData\Local\Arduino15\packages -tools F:\arduino-1.8.16\tools-builder -tools F:\arduino-1.8.16\hardware\tools\avr -tools C:\Users\Merli\AppData\Local\Arduino15\packages -built-in-libraries F:\arduino-1.8.16\libraries -libraries D:\Users\Merli\Documents\Arduino\libraries -fqbn=teensy:avr:teensy41:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10816 -build-path C:\Users\Merli\AppData\Local\Temp\arduino_build_837961 -warnings=none -build-cache C:\Users\Merli\AppData\Local\Temp\arduino_cache_650406 -verbose C:\Users\Merli\AppData\Local\Temp\arduino_modified_sketch_278720\LittleFS_QSPI_Simple_Datalogger.ino
    F:\arduino-1.8.16\arduino-builder -compile -logger=machine -hardware F:\arduino-1.8.16\hardware -hardware C:\Users\Merli\AppData\Local\Arduino15\packages -tools F:\arduino-1.8.16\tools-builder -tools F:\arduino-1.8.16\hardware\tools\avr -tools C:\Users\Merli\AppData\Local\Arduino15\packages -built-in-libraries F:\arduino-1.8.16\libraries -libraries D:\Users\Merli\Documents\Arduino\libraries -fqbn=teensy:avr:teensy41:usb=serial,speed=600,opt=o2std,keys=en-us -ide-version=10816 -build-path C:\Users\Merli\AppData\Local\Temp\arduino_build_837961 -warnings=none -build-cache C:\Users\Merli\AppData\Local\Temp\arduino_cache_650406 -verbose C:\Users\Merli\AppData\Local\Temp\arduino_modified_sketch_278720\LittleFS_QSPI_Simple_Datalogger.ino
    Using board 'teensy41' from platform in folder: F:\arduino-1.8.16\hardware\teensy\avr
    Using core 'teensy4' from platform in folder: F:\arduino-1.8.16\hardware\teensy\avr
    Detecting libraries used...
    "F:\\arduino-1.8.16\\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=156 -DARDUINO=10816 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\cores\\teensy4" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\sketch\\LittleFS_QSPI_Simple_Datalogger.ino.cpp" -o nul
    Alternatives for LittleFS.h: [LittleFS@1.0.0]
    ResolveLibrary(LittleFS.h)
      -> candidates: [LittleFS@1.0.0]
    "F:\\arduino-1.8.16\\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=156 -DARDUINO=10816 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\cores\\teensy4" "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\libraries\\LittleFS\\src" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\sketch\\LittleFS_QSPI_Simple_Datalogger.ino.cpp" -o nul
    Alternatives for SPI.h: [SPI@1.0]
    ResolveLibrary(SPI.h)
      -> candidates: [SPI@1.0]
    "F:\\arduino-1.8.16\\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=156 -DARDUINO=10816 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\cores\\teensy4" "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\libraries\\LittleFS\\src" "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\sketch\\LittleFS_QSPI_Simple_Datalogger.ino.cpp" -o nul
    Using cached library dependencies for file: F:\arduino-1.8.16\hardware\teensy\avr\libraries\LittleFS\src\LittleFS.cpp
    Using cached library dependencies for file: F:\arduino-1.8.16\hardware\teensy\avr\libraries\LittleFS\src\LittleFS_NAND.cpp
    Using cached library dependencies for file: F:\arduino-1.8.16\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs.c
    Using cached library dependencies for file: F:\arduino-1.8.16\hardware\teensy\avr\libraries\LittleFS\src\littlefs\lfs_util.c
    Using cached library dependencies for file: F:\arduino-1.8.16\hardware\teensy\avr\libraries\SPI\SPI.cpp
    Generating function prototypes...
    "F:\\arduino-1.8.16\\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=156 -DARDUINO=10816 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\cores\\teensy4" "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\libraries\\LittleFS\\src" "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\sketch\\LittleFS_QSPI_Simple_Datalogger.ino.cpp" -o "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    "C:\\Users\\Merli\\AppData\\Local\\Arduino15\\packages\\builtin\\tools\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\preproc\\ctags_target_for_gcc_minus_e.cpp"
    Compiling sketch...
    "F:\\arduino-1.8.16\\hardware\\teensy/../tools/precompile_helper" "F:\\arduino-1.8.16\\hardware\\teensy\\avr/cores/teensy4" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961" "F:\\arduino-1.8.16\\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=156 -DARDUINO=10816 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr/cores/teensy4" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/pch/Arduino.h" -o "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/pch/Arduino.h.gch"
    Using previously compiled file: C:\Users\Merli\AppData\Local\Temp\arduino_build_837961\pch\Arduino.h.gch
    "F:\\arduino-1.8.16\\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=156 -DARDUINO=10816 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/pch" "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\cores\\teensy4" "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\libraries\\LittleFS\\src" "-IF:\\arduino-1.8.16\\hardware\\teensy\\avr\\libraries\\SPI" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\sketch\\LittleFS_QSPI_Simple_Datalogger.ino.cpp" -o "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\sketch\\LittleFS_QSPI_Simple_Datalogger.ino.cpp.o"
    Compiling libraries...
    Compiling library "LittleFS"
    Using previously compiled file: C:\Users\Merli\AppData\Local\Temp\arduino_build_837961\libraries\LittleFS\LittleFS.cpp.o
    Using previously compiled file: C:\Users\Merli\AppData\Local\Temp\arduino_build_837961\libraries\LittleFS\LittleFS_NAND.cpp.o
    Using previously compiled file: C:\Users\Merli\AppData\Local\Temp\arduino_build_837961\libraries\LittleFS\littlefs\lfs.c.o
    Using previously compiled file: C:\Users\Merli\AppData\Local\Temp\arduino_build_837961\libraries\LittleFS\littlefs\lfs_util.c.o
    Compiling library "SPI"
    Using previously compiled file: C:\Users\Merli\AppData\Local\Temp\arduino_build_837961\libraries\SPI\SPI.cpp.o
    Compiling core...
    Using precompiled core: C:\Users\Merli\AppData\Local\Temp\arduino_cache_650406\core\core_434ba00d6866af7ee4932326eb38493e.a
    Linking everything together...
    "F:\\arduino-1.8.16\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-gcc" -O2 -Wl,--gc-sections,--relax "-TF:\\arduino-1.8.16\\hardware\\teensy\\avr\\cores\\teensy4/imxrt1062_t41.ld" -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -o "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/LittleFS_QSPI_Simple_Datalogger.ino.elf" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\sketch\\LittleFS_QSPI_Simple_Datalogger.ino.cpp.o" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\libraries\\LittleFS\\LittleFS.cpp.o" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\libraries\\LittleFS\\LittleFS_NAND.cpp.o" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\libraries\\LittleFS\\littlefs\\lfs.c.o" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\libraries\\LittleFS\\littlefs\\lfs_util.c.o" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961\\libraries\\SPI\\SPI.cpp.o" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/..\\arduino_cache_650406\\core\\core_434ba00d6866af7ee4932326eb38493e.a" "-LC:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961" -larm_cortexM7lfsp_math -lm -lstdc++
    "F:\\arduino-1.8.16\\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\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/LittleFS_QSPI_Simple_Datalogger.ino.elf" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/LittleFS_QSPI_Simple_Datalogger.ino.eep"
    "F:\\arduino-1.8.16\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objcopy" -O ihex -R .eeprom "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/LittleFS_QSPI_Simple_Datalogger.ino.elf" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/LittleFS_QSPI_Simple_Datalogger.ino.hex"
    "F:\\arduino-1.8.16\\hardware\\teensy/../tools/teensy_secure" encrypthex TEENSY41 "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/LittleFS_QSPI_Simple_Datalogger.ino.hex"
    encrypting 71680 bytes to C:\Users\Merli\AppData\Local\Temp\arduino_build_837961/LittleFS_QSPI_Simple_Datalogger.ino.ehex
    "F:\\arduino-1.8.16\\hardware\\teensy/../tools/teensy_post_compile" -file=LittleFS_QSPI_Simple_Datalogger.ino "-path=C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961" "-tools=F:\\arduino-1.8.16\\hardware\\teensy/../tools/" -board=TEENSY41
    "F:\\arduino-1.8.16\\hardware\\teensy/../tools/stdout_redirect" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/LittleFS_QSPI_Simple_Datalogger.ino.sym" "F:\\arduino-1.8.16\\hardware\\teensy/../tools/arm/bin/arm-none-eabi-objdump" -t -C "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/LittleFS_QSPI_Simple_Datalogger.ino.elf"
    "F:\\arduino-1.8.16\\hardware\\teensy/../tools/teensy_size" "C:\\Users\\Merli\\AppData\\Local\\Temp\\arduino_build_837961/LittleFS_QSPI_Simple_Datalogger.ino.elf"
    Memory Usage on Teensy 4.1:
      FLASH: code:62976, data:8520, headers:8372   free for files:8046596
       RAM1: variables:8928, code:57208, padding:8328   free for local variables:449824
       RAM2: variables:12384  free for malloc/new:511904
    Using library LittleFS at version 1.0.0 in folder: F:\arduino-1.8.16\hardware\teensy\avr\libraries\LittleFS 
    Using library SPI at version 1.0 in folder: F:\arduino-1.8.16\hardware\teensy\avr\libraries\SPI

  11. #286
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    Thx. Mjs: Could you send me your hex file?

  12. #287
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,670
    Quote Originally Posted by Frank B View Post
    Thx. Mjs: Could you send me your hex file?
    Here you go - hope it the right on.
    Attached Files Attached Files

  13. #288
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    Code:
    Flash ID: FF FF FF
    Error starting QSPI FLASH
    There is something wrong...
    ID FF FF FF
    The board has PSRAM, too. (The PSRAM works) Could this be the problem? Don't they work together?

  14. #289
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    Thx, MJS, your hex does not workk, too :-(

    Just the normal thing.. every time i just want to test something or need it i run into errors :-(

    is it just me??

    Michael, I just wanted to test your littlfs audio wave (my version) again. Gave the board where it worked away to a friend. But I had this other board, so just wanted to use it...
    So, Question:

    Has anyone tested if that all works with two chipes: QSPI-flash + PSRAM?
    (Btw, why is nand called "QPI" <- a bit confusing for users, and inconsistent?)

  15. #290
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,670
    Quote Originally Posted by Frank B View Post
    Code:
    Flash ID: FF FF FF
    Error starting QSPI FLASH
    There is something wrong...
    ID FF FF FF
    The board has PSRAM, too. (The PSRAM works) Could this be the problem? Don't they work together?
    Not sure what you mean work together but for LittleFS they are accessed differently.

    Ok so the board has PSRAM and a FLASH - you sure its not a NAND? You could try and use LittleFS_QPINAND just as a quick test....

    Also try ruinning the PSRAM LittleFS example....LittleFS_PSRAM_Simple_Datalogger,ino

    Or maybe its time to upgrade to at least TD1.55 instead of 1.53b?

  16. #291
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,670
    Quote Originally Posted by Frank B View Post
    Thx, MJS, your hex does not workk, too :-(

    Just the normal thing.. every time i just want to test something or need it i run into errors :-(
    is it just me??
    Not just you - happens to all of us - especially for things I have played with for a while.... and then it usually something silly I am doing.

  17. #292
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    W25Q512JV*IM is a NOR according to the table you linked in the readme.
    Hey, if its silly to just run example code you're right

  18. #293
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,271
    Quote Originally Posted by mjs513 View Post
    Not just you - happens to all of us - especially for things I have played with for a while.... and then it usually something silly I am doing.
    ... and me ... I find some wonderful things ...

    @Frank - indeed both on T_4.1 do work. Is the QSPI Flash WSON style or just 8 leg chip? Indeed if WSON it may be NAND not NOR

  19. #294
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,271
    Quote Originally Posted by Frank B View Post
    W25Q512JV*IM is a NOR according to the table you linked in the readme.
    Hey, if its silly to just run example code you're right
    I have one here ending in "Q" - is the "M" the odd one out?

  20. #295
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,670
    Quote Originally Posted by Frank B View Post
    W25Q512JV*IM is a NOR according to the table you linked in the readme.
    Hey, if its silly to just run example code you're right
    Had to ask - sorry - yep - happened to me. To be honest the only thing I can think of is to update to 1.55 or 1.56beta2. Right now I am at a total loss.

    EDIT> with 1.55beta2 we added support for timestamps and a couple of other things so just maybe something is not linking right.

  21. #296
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    I have 1.56beta2 - and your hex did not work , too...
    Ok, I think I have to solder an other board.
    But perhaps someone should test if PSRAM and QSPIFlash work together (with Littlfs) - At the moment, it looks like it does not.

  22. #297
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,271
    Quote Originally Posted by mjs513 View Post
    Here you go - hope it the right on.
    Ran this p#287 HEX on T_4.1 with W25Q512JV*IQ here and it works!

  23. #298
    Senior Member+ defragster's Avatar
    Join Date
    Feb 2015
    Posts
    15,271
    Quote Originally Posted by defragster View Post
    Ran this p#287 HEX on T_4.1 with W25Q512JV*IQ here and it works!
    Found another T_4.1 with PSRAM and SMALLER legged QSPI NOR FLASH and the same HEX also works there.
    It was used in long ago testing of LFSIntegrity - as contents show - except no date.
    Code:
    Stopped Logging Data!!!
    Records written = 36
    
     Space Used = 8413184
    Filesystem Size = 16777216
    Directory
    ---------
    0_bigfile.txt                         8337408
    1_dir/
    2_dir/
    3_dir/
      B_file.txt                          2536
    4_dir/
      D_file.txt                          3560
    5_dir/
    datalog.txt                           252

  24. #299
    Senior Member+ mjs513's Avatar
    Join Date
    Jul 2014
    Location
    New York
    Posts
    7,670
    Quote Originally Posted by Frank B View Post
    I have 1.56beta2 - and your hex did not work , too...
    Ok, I think I have to solder an other board.
    But perhaps someone should test if PSRAM and QSPIFlash work together (with Littlfs) - At the moment, it looks like it does not.
    Ok challenge accepted - with the latest changes to MTP_Teensy and the SDFat/SD/FS (note beyond beta2) I used MTP_test to create a Program - PSRAM - QSPI (Flash) disk:
    Click image for larger version. 

Name:	Capture.PNG 
Views:	36 
Size:	5.1 KB 
ID:	26177

    Tested that all disks are there and working. In other words I can copy a wav file and play it via windows media player. So yes they do work together. I used the original beta board for test

  25. #300
    Senior Member
    Join Date
    Apr 2014
    Location
    Germany
    Posts
    9,408
    Tim, ok. Looks like the flash died a few minutes ago.. the first time i'm seeing this.
    @Michael: Ok... thanks..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •