Skip to content

Commit e7fabe1

Browse files
authored
Merge pull request #8582 from tannewt/document_heap_config
Document CIRCUITPY_HEAP_START_SIZE
2 parents 75fcacd + 2eb2830 commit e7fabe1

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

docs/environment.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,21 @@ CIRCUITPY_BLE_NAME
6060
~~~~~~~~~~~~~~~~~~
6161
Default BLE name the board advertises as, including for the BLE workflow.
6262

63+
CIRCUITPY_HEAP_START_SIZE
64+
~~~~~~~~~~~~~~~~~~~~~~~~~
65+
Sets the initial size of the python heap, allocated from the outer heap. Must be a multiple of 4.
66+
The default is currently 8192.
67+
The python heap will grow by doubling and redoubling this initial size until it cannot fit in the outer heap.
68+
Larger values will reserve more RAM for python use and prevent the supervisor and SDK
69+
from large allocations of their own.
70+
Smaller values will likely grow sooner than large start sizes.
71+
6372
CIRCUITPY_PYSTACK_SIZE
6473
~~~~~~~~~~~~~~~~~~~~~~
6574
Sets the size of the python stack. Must be a multiple of 4. The default value is currently 1536.
6675
Increasing the stack reduces the size of the heap available to python code.
6776
Used to avoid "Pystack exhausted" errors when the code can't be reworked to avoid it.
6877

69-
CIRCUITPY_RESERVED_PSRAM
70-
~~~~~~~~~~~~~~~~~~~~~~~~
71-
On boards with Espressif microcontrollers with PSRAM (also called SPIRAM), permanently reserve a portion of PSRAM for use by esp-idf.
72-
This storage is removed from the CircuitPython "heap" and is available for allocation by esp-idf routines in the core instead.
73-
Generally, only set this to a non-zero value when it is required by a specific core module.
74-
7578
CIRCUITPY_WEB_API_PASSWORD
7679
~~~~~~~~~~~~~~~~~~~~~~~~~~
7780
Password required to make modifications to the board from the Web Workflow.

0 commit comments

Comments
 (0)