V 1.8.7 Micropython Released - support importing compiled .mpy files - More RAM ?



  • Hi Team,
    I was just able to see that new version of Micropython v1.8.7 has been released and it states
    There is now support for importing packages from compiled .mpy files

    Does this mean that we will get more RAM for user code ? And if so when can we see this being upgraded for LOPY?

    Thanks & regards,
    Hari



  • Micropython supoorts compiled .mpy files since a while. This option is not enabled on LoPy. You can do so, if you build your own image. Just add the line:

    #define MICROPY_PERSISTENT_CODE_LOAD (1)

    to esp32/mpconfigport.h and rebuild the flash image with
    make BOARD=LOPY
    after building, you can load the image to the lopy witth
    make BOARD=LOPY flash
    Be sure to connect G23 and GND, which is needed for all variants of flash loading. You will NOT have more RAM at runtime, but be able to run larger code, since the RAM is not needed for compiling.

    For building the image you need to setup the build environment. Instructions can be found at https://github.com/pycom/pycom-micropython/README.md, section ESP32. And yes, a Linux system is best for that purpose. It might be a virtual machine, at least for creating the image.


Log in to reply
 

Pycom on Twitter