When esp32S3 uses microython, it uses too much internal memory #10010
Unanswered
Zhengqinze05
asked this question in
Core Development
Replies: 2 comments
-
I'm sorry I don't quite understand what you're asking. If you have a .elf file and want to know what is being put into RAM, you can use |
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
-
I use ESP32S3, which uses 100k of internal memory when using microython. My board has PSRAM, gc_ Init() uses the memory requested by
PSRAM.Theoretically, except for 16k In addition to the mp_task () thread, other memory should be requested from PSRAM. Miraculously, I
didn't apply for memory elsewhere. When I started the microython thread, the system disappeared for no reason
100k of memory. It is not the heap memory consumed during use. I tried to add judgment in the mp_task() thread so that all Python related
code would not run, but the memory did not Reduce. Unless the thread is annotated or the code inside the thread is annotated, the
memory will be reduced by 100k. By comparing the memory size of whether to start microython when compiling, I find that it seems to be
allocated when compiling.But I still don't know where to use the memory. Does anyone know where these memories are consumed and
how to reduce them. Any answer would be highly appreciated.
This is the memory distribution at compile time without the mp_task () annotation
Used static IRAM: 139730 bytes ( 222510 remain, 38.6% used)
.text size: 138703 bytes
.vectors size: 1027 bytes
Used stat D/IRAM: 67137 bytes ( 105791 remain, 38.8% used)
.data size: 30641 bytes
.bss size: 36496 bytes
Used Flash size : 1793666 bytes
.text : 1363395 bytes
.rodata : 430015 bytes
Total image size: 1964037 bytes (.bin may be padded larger)
This is the memory distribution at compile time after the mp_task () annotation:
Used static IRAM: 71138 bytes ( 291102 remain, 19.6% used)
.text size: 70111 bytes
.vectors size: 1027 bytes
Used stat D/IRAM: 35457 bytes ( 137471 remain, 20.5% used)
.data size: 17121 bytes
.bss size: 18336 bytes
Used Flash size : 480211 bytes
.text : 354359 bytes
.rodata : 125596 bytes
Total image size: 568470 bytes (.bin may be padded larger)
Beta Was this translation helpful? Give feedback.
All reactions