Giter Site home page Giter Site logo

Teensy crashes with LITTLEFS about imxrt1062 HOT 6 CLOSED

grblhal avatar grblhal commented on July 17, 2024
Teensy crashes with LITTLEFS

from imxrt1062.

Comments (6)

terjeio avatar terjeio commented on July 17, 2024

Which version? Do the Teensy repeatedly reboot?
It could be due to littlefs failing to mount the drive due to "corrupted" flash.
Can you comment out this line to force a format before mounting?

Some related info in this thread.

from imxrt1062.

BehemothTheKitten avatar BehemothTheKitten commented on July 17, 2024

Thank you for getting back to me.

It is VER:1.1f.20220914 on a Teensy 4.1 and yes, it does keep keep rebooting every ~10 seconds.

I've been able to replicate the problem on two additional bare Teensy boards, including a brand new one. Forcing a format, as you recommended, does resolve it. In fact, once I have flashed the modified firmware and formatted the file system, I can now use the original code without commenting out the IF statement.

  1. Build unmodified grblHAL 20220914 and upload it to a brand new Teensy.
  2. Teensy keeps rebooting
  3. Comment out the IF statement, build grblHAL, and upload it to Teensy
  4. grblHAL works normally
  5. Build unmodified grblHAL 20220914 and upload it to Teensy.
  6. grblHAL continues to work normally

I've been able to use these steps to "fix" the problem on 3 different boards (2 bare controllers and one installed on T41U5XBB). However, unmodified grblHAL 20220914 refuses to work on a "virgin" Teensy.

from imxrt1062.

terjeio avatar terjeio commented on July 17, 2024

Great, I guess it is due to assert statements in the littlefs code that triggers the reset. Cant't remember now if this happened for me as well as I worked with several implementations at the same time - and I had similar problems with the RP2040 driver.

What could be tried is to erase the flash area used for littlefs and see if it still crashes on mount. If not the perhaps a workaround for this is to release the erase code and instruct users to run it before enabling littlefs/webui?

from imxrt1062.

BehemothTheKitten avatar BehemothTheKitten commented on July 17, 2024

It looks like the fix is permanent and since I'm out of unused Teensy boards, I can no longer replicate the problem. I tried the 15 second reset, which did load the blinky program, but failed to overwrite the region used by littlefs.

Either that or check for a "file system formatted" flag in EEPROM (real or emulated) before attempting to mount the FS - if not set, format littlefs, and then set it. Since I have a deep appreciation of the Dunning-Kruger Effect and absolutely no understanding of your code, I will not bother with a useless pull request.

from imxrt1062.

terjeio avatar terjeio commented on July 17, 2024

I will turn off littlefs assertions in the next commit and gamble on an error is returned instead causing a format.

I'll keep this issue open for now, if somebody else experience crashes please report.

from imxrt1062.

terjeio avatar terjeio commented on July 17, 2024

I believe this has been fixed in later builds.

from imxrt1062.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.