Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5033

Python • Re: MemoryError: memory allocation failed, allocating 21858 bytes

$
0
0
@DS256
I cross compile my PICO uPython programs on the host computer I'm running Thonny from. I then copy the .MPY back to the PICO.
Do you mean the .PY file?
I can't find any .MPY files
@DeaD_EyE is pointing you at the source I use.

The output of the cross compiler is a .MPY file. That being said, I just remembered you can't cross compile the BOOT.PY and MAIN.PY uPython programs. I documented how to cross compile uPython programs for PICO's here https://github.com/DS256/Compile-Microp ... T-and-MAIN

The question that has not been asked is what are you using to compile your 3000 line uPython program? That may help understand better what you are encountering.
I use Thonny to compile, I wrote the program very linear, a lot of the same code with small changes.
I'm goining to look if I can rewrite the code to make it compacter.

Statistics: Posted by petervanlievenoogen — Fri Oct 25, 2024 12:54 pm



Viewing all articles
Browse latest Browse all 5033

Trending Articles