Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Requesting Manual Flashing procedure

    Scheduled Pinned Locked Moved LoPy
    firmware updatememoryerror
    5 Posts 2 Posters 1.1k Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      shiva shankar
      last edited by

      Hi,
      I am using Lopy1 for microwebseerver based project (firmware version 1.10.2.b1)for months it was good ,
      after updating firmware to 1.16.0.b I am getting memory error on ruining the sample code of microwebserver.
      Lopy1 Memory

      • RAM: 512KB
      • External flash 4MB
        Firmware Upgrading tool automatically upgrade the firmware to latest it doesn't allow user to select firmware.

      1)How to solve memory error ?

      1. Is it possible to clean the memory ?

      3)Has the latest firmware consumed more space of my memory ...if so how to
      downgrade my firmware

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @shiva shankar
        last edited by

        @shiva-shankar
        about 1) Depends on the time you get the memory error. If it is during import of a module, pre-compiling the module can help. That converts a .py file into a .mpy file, which requires less memory during import. The tool to do so is mpy-cross. You have to compile it oyurself from the repository. I have pre-compiled versions for Linux and Windows here: https://github.com/robert-hh/Shared-Stuff
        Files mpy-cross_pycom_linux and mpy-cross_pycom.exe
        If you get memory errors at runtime, frorzen byetcode does the trick. That however requires to build the whole firmware yourself. Doing that, you can embed your code into flash memory, at which time it does not consume RAM any more.
        about 2) There is nothing like cleaning memory
        about 3) https://forum.pycom.io/topic/517/downgrading-firmware-advanced-users/22

        S 1 Reply Last reply Reply Quote 1
        • S Offline
          shiva shankar @robert-hh
          last edited by

          @robert-hh
          appreciate your response,the memory error is happening during import i will try mpy method also can point me some procedure or articles for implementing frozen approach.
          2)I have succeeded firmware downgrade but I am getting memory error again.

          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @shiva shankar
            last edited by robert-hh

            @shiva-shankar For building your own firmware, best is to clone the repository at https://github.com/pycom/pycom-micropython-sigfox and follow the instructions in README.md.
            For embedding your code into flash, just copy your python files into
            <your_path>/pycom-micorpython-sigfox/esp32/frozen
            and build the firmware. A linux environment is recommended for building.

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              shiva shankar @robert-hh
              last edited by

              @robert-hh
              Thanks will try and come back to you,

              1 Reply Last reply Reply Quote 0

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • 1 / 1
              • First post
                Last post

              Pycom on Twitter

              Pycom