New Flash API, and nice surprise for Pico owners!

Posted on
Page
of 2
Prev
/ 2
  • Hi Gordon
    Works perfect. I'm able to use the extra mem.
    Sacha

  • Hi Gorden
    Sorry, something goes wrong with 1.82. This code worked with 1.81. Now the Pico crashes with the following on the console:

    >ff = process.memory().flash_start + 384*1024;
    =134610944
    >f=require("Flash");
    =function () { [native code] }
    >f.erasePage(ff);
    =ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
    
    

    After reinsert the pico into USB, the red LED is on permanently. Have to reflash to access the pico.

    Thanks

    Sacha

  • Wow, that's not good. Thanks - I'll look into it.

  • Ok, that's bad news. Just checked and the firmware is actually too big and is encroaching on that last page.

    Annoyingly the build-time check I have didn't work with the Pico's flash memory layout. I'll try and save a bit of space in the build and will re-upload with a 1v83.

  • Ok. I will use 1v81 in the meantime.

  • 1v83 released, and there's now enough memory free - so you can go back to using the flash again.

  • ...for example to store all this read/only TSL stuff...

  • ... if only! Sadly I don't think there's a way to do that with the firmware as it is now, because the API requires that all 3 variables are in the same object at once.

    However I might be able to make some minor changes to make that happen. I have just filed an issue for it: https://github.com/espruino/Espruino/issues/738

  • Hi Gordon
    Thank you very much! Works again. Compared to 1v81, in my current project, there is around 220 more free memory.
    Sacha

  • @Gordon, I see your 'disgust' having to break negative news... but before finishing, your 'back-burner' already infused a solution idea... Thanks.

    PS: running from flash without copying into RAM was my first thought after taking a first look at Espruino's JS interpreter.

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

New Flash API, and nice surprise for Pico owners!

Posted by Avatar for Gordon @Gordon

Actions