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

    noob question regarding Flash and Memory

    Scheduled Pinned Locked Moved Comments & Feedback
    memoryflashmemoryerrormemory size
    3 Posts 2 Posters 83 Views 3 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.
    • T Offline
      troy salt
      last edited by

      I know this is pretty basic, but I would appreciate if someone can help me better understand Flash vs memory on the Pycom.

      When you press the board info tab in Pymakr, you see two figures, Flash status and Memory status.

      From what I think, the memory is the storage of the device. If I upload more files to the filesystem, I reduce the amount of memory available on the device.
      And flash is where variables and and libraries are loaded to, accessed, and manipulated during the device’s operation.

      Do I have that correct?

      If this is true, then a library would be stored in the memory, however If I import a library, does it then get loaded into flash? If yes, then it seems I should work to reduce the amount of unnecessary libraries I import. If not, then it shouldn’t have any consequence on flash memory if I import many libraries even I won’t use them? I ask because I do frequently run into crashes which I think have to do with memory issues.

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @troy salt
        last edited by

        @troy-salt it’s actually the opposite. Flash memory is persistent storage, like an SSD on a PC (or like a hard disk drive, but a lot faster), or like a USB pen drive.

        Anything you store on the device goes into flash: your .py files (your app, libraries...), any data, logs, etc. Firmware is also stored in flash, as well as non-volatile data (accessed via nvs_set/nvs_get).

        When you run things, they will usually be loaded in memory (RAM). All data manipulated by your program will also be in RAM. RAM contents are lost when you cut power or on reset.

        1 Reply Last reply Reply Quote 0
        • T Offline
          troy salt
          last edited by

          @jcaron Thanks for the clarification. Okay, Then how about the second part of my question? If I import a library, does the whole library (including unused functions) get loaded into / waste memory?

          Thanks,
          Troy

          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