save() not working on the micro:bit

Posted on
  • If I use espruino 1v86 on my microbit you get this error when calling save:

    Erasing Flash...
    Writing...
    ERROR: Too big to save to flash (244 vs -4 bytes)
    Deleting command history and trying again...
    Erasing Flash...
    Writing...
    ERROR: Too big to save to flash (163 vs -4 bytes)
    

    however if I use espruino 1v85 I can save files all day long. for 1v86 i even enabled the minification in the web IDE which said it minifed from 41bytes to 8, this still didnt allow the save in 1v86, only works in 1v85.

    EDIT: If i use any form of minification with 1v86 it fails because it changes things like show(1); to ho(1);

  • Hmm - I'm not sure why the minification does that...

    I'll try and look into this next week - the fact it says -4 makes me think that somehow it's got confused about how much flash memory it has available.

  • Is there a way to show the amount of memory avaliable?

  • process.memory() - but as far as I know that won't show how much flash is available.

  • Yeah, I found these commands, it doesn't show flash.

  • To be honest there's nothing you can really do about it from Espruino itself - it'll need rebuilding...

  • I downloaded from the "cutting edge" builds espruino_1v86.206_microbit.hex and now it works fine, I can save code and run code on it. I see someone made a fix in github.

  • Yes, I literally did it about an hour ago. Glad it's fixed for you!

  • Yep, thanks!

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

save() not working on the micro:bit

Posted by Avatar for bennyfa @bennyfa

Actions