RP2040 ram issue is back to haunt me #14032
Unanswered
kjm1102
asked this question in
RP2040 / Pico
Replies: 1 comment
-
Spent the last week pruning the .mpy, this is no way to live! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
A few years ago, when I started getting memory allocation errors, I switched to using .mpy files in lieu of .py, the pico was happy to do a 20k OTA download of a new .mpy Vs 60k for a .py and it was easy enough to use boot.py to import code.mpy to run my programs.
However the memory allocation errors left me wary since I didn't understand how a 60k .py file could not download a new version of itself when the chip reports 188k of ram available at powerup. So every so often I check the userland code updater still works.
I do the check in the IDE with boot.py disabled so I can can run the .mpy file from the prompt by typing import code. The .mpy files are still only ~20k in size & the new version downloads from the website.
Today a .mpy file self started from powerup. It did this because I forgot to disable boot.py which promptly imported the .mpy file. To my great distress the OTA update failed with a memory allocation error. I have no clue why this should be? Why should a program triggered by an import code cmd in boot.py not work while the same program started by importing it manually from the IDE prompt works OK?
Beta Was this translation helpful? Give feedback.
All reactions