Total available RAM size on ESP32 and the meaning of ESP_STACK_SIZE
?
#7422
Replies: 1 comment
-
Posted at 2020-10-05 by Ragtime Answer to question 3: Posted at 2020-10-05 by Ragtime Try to answer question 1:
Since ESP32 has 328 KiB of data RAM, the theoretical maximum DRAM heap for Espruino is 328 KiB. But the stack size needs to be allocated from the heap. Other tasks also take up the data RAM. Posted at 2020-10-05 by Ragtime Try to answer question 2:
Posted at 2020-10-06 by jeffmer I ran into the same problem when trying to build a board without the BLUETOOTH module. To fix it, you need to edit the file BTW: Removing Bluetooth also reduces power consumption by around 40ma. Posted at 2020-12-02 by hungryforcodes Hi. Were you aware of:
? It will disable the BLE functionality on the ESP32. It will also erase all your code. But when you restart the board, it should give you an additional 2K JSVars, so around 4K JSVars total. You can then reflash your program and take advantage of the additional memory space. Additionally, if you get a board with PSRAM (4MB or 8MB), it will give you up to another 16K JSVars, which will bring your total up to 20K. -hfc Posted at 2020-12-02 by jeffmer @hungryforcodes - I did exactly as you suggest - actually I removed the BLUETOOTH module entirely - for Espruino on the TWATCH. See Posted at 2020-12-02 by hungryforcodes Wow, that's really impressive! I had been thinking of throwing up a github just like that for the TTGO Watch 2020. You've ever got the unbuffered frame buffer modification for the ST7789V. I'll have a deeper look at this. :) |
Beta Was this translation helpful? Give feedback.
-
Posted at 2020-10-05 by Ragtime
Some questions regarding the RAM size and board definition file for Espruino on ESP32.
What is the theoretical maximum number of the available RAM for Espruino on ESP32? Since ESP32's RAM is not contiguous, is Espruino taking up only one of the chunks? Is that configurable somewhere?
How can I increase the current
2300
blocks of total available RAM?(I tried with reducing
ESP_STACK_SIZE
from theboards/*.py
file and it worked.I tried removing
BLUETOOTH
but build failed with errors)ESP_STACK_SIZE
mean inboards/ESP32.py
? Is that reserved for function calls in JS code? Is the stack here using the same RAM chunk as the runtime RAM?Beta Was this translation helpful? Give feedback.
All reactions