Espruino Pico - E.unmountSD()

Posted on
  • Hello Gordon,

    I experienced that the system forgets about the configuration of the SD card reader made initially when you call "E.unmountSD()"

    Would it be possible that Espruino keeps the settings for further SD-Card requests? In my project I am doing lots of unmounts to be sure that the SD-card filesystem doesn't corrupt when the card is being removed at any time. I have to set the initial settings now before every SD card access.

    Best,

    Tobias

  • Sure - sounds like a good plan. I've just added it so it'll be in the next build.

  • When will the next build be created? I currently just see the one before.

  • With the build you sent me, the serial console stucks suddenly. When I reconnect the Pico it is responding again and the following error flag is set:

    >E.getErrorFlags();
    =[
      "FIFO_FULL"
     ]
    > 
    
  • What code were you uploading to it? Do you have something small as an example?

    Are you sure it's not just that some bit of code is taking a long time to execute?

  • It was very complex code with access to the SD card, different libraries I wrote and modules...

    I could reproduce it... But for now it is working... The strange thing is, I didn't make any change... I just disconnected the board a few times and reconnected it to USB...

    UPDATE: I have the problem again.

    I cannot post the code because it is related to my masters thesis therefore I cannot publish it here.

  • I'm not sure what to suggest - and the old firmware definitely works?

    Maybe try Ctrl+C? If the code was stuck waiting for something it should hopefully break out and give you a stack trace of where it stopped.

  • I try to come up with more details soon

  • Ctrl+C doesn't work.

  • Seems to be just a problem with the build you sent me. I had strange problems. Sometimes I got it working by just adding a few white space characters. After removing them it didn't work again. Looked like weird problems with the JS parser.

    I can not find a bin file for the most recent commit:
    http://www.espruino.com/binaries/git/com­mits/10464eabd031e6bb8bea1a521cdd1a15fcb­94088/

    What happend here?

  • Sometimes I got it working by just adding a few white space characters.

    Ok, I'd think that was almost certainly that there's something in your code that is taking a long time to execute during the code upload? Maybe that build is marginally slower than the last and so it suddenly starts having problems.

    In that case, if it breaks after upload, try [Ctrl+C]echo(1)[Enter]. The echo won't display until you hit enter after it. You should then get a console back and be able to step back in command history and see what the last correct bit of code was.

    It sometimes happens if you:

    • defined and executed some large closure function
    • Executed a function that took a while to execute
    • initialised some bit of hardware in the root scope (eg. not in onInit) and then had a load of code after it
    • pulled in some large modules - although that happens less often now it seems

    As a start, try doing any function calls you need to initialise from inside onInit, rather than in the root scope.

    I can not find a bin file for the most recent commit:

    Argh. The joys of Python :( Looks like the build machine has an older version of python in that doesn't contain a library function I just started using (in order to get better version numbers). I'll have to fix that, but it'll be tomorrow now.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Espruino Pico - E.unmountSD()

Posted by Avatar for net-tobi @net-tobi

Actions