From 3e6456d7e14e4ebd5ec5a313993a3a071c696977 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Fri, 10 Nov 2023 15:53:49 -0800 Subject: [PATCH 1/3] Document CIRCUITPY_HEAP_START_SIZE and remove CIRCUITPY_RESERVED_PSRAM. Fixes #8581 --- docs/environment.rst | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/environment.rst b/docs/environment.rst index bb6f8d2821..c7e05c082d 100644 --- a/docs/environment.rst +++ b/docs/environment.rst @@ -60,18 +60,19 @@ CIRCUITPY_BLE_NAME ~~~~~~~~~~~~~~~~~~ Default BLE name the board advertises as, including for the BLE workflow. +CIRCUITPY_HEAP_START_SIZE +~~~~~~~~~~~~~~~~~~~~~~ +Sets the initial size of the python heap. Must be a multiple of 4. The heap will grow by doubling +this initial size until the outer heap cannot fit it. Larger values will reserve more RAM for python +use and prevent the supervisor and SDK from large allocations of their own. Smaller values will +likely grow sooner than large start sizes. + CIRCUITPY_PYSTACK_SIZE ~~~~~~~~~~~~~~~~~~~~~~ Sets the size of the python stack. Must be a multiple of 4. The default value is currently 1536. Increasing the stack reduces the size of the heap available to python code. Used to avoid "Pystack exhausted" errors when the code can't be reworked to avoid it. -CIRCUITPY_RESERVED_PSRAM -~~~~~~~~~~~~~~~~~~~~~~~~ -On boards with Espressif microcontrollers with PSRAM (also called SPIRAM), permanently reserve a portion of PSRAM for use by esp-idf. -This storage is removed from the CircuitPython "heap" and is available for allocation by esp-idf routines in the core instead. -Generally, only set this to a non-zero value when it is required by a specific core module. - CIRCUITPY_WEB_API_PASSWORD ~~~~~~~~~~~~~~~~~~~~~~~~~~ Password required to make modifications to the board from the Web Workflow. From 57238aa02cddb20e2fe369e0c7bc56ddd37edefe Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 10 Nov 2023 20:25:06 -0500 Subject: [PATCH 2/3] Update docs/environment.rst --- docs/environment.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/environment.rst b/docs/environment.rst index c7e05c082d..704c8ebdcf 100644 --- a/docs/environment.rst +++ b/docs/environment.rst @@ -62,10 +62,12 @@ Default BLE name the board advertises as, including for the BLE workflow. CIRCUITPY_HEAP_START_SIZE ~~~~~~~~~~~~~~~~~~~~~~ -Sets the initial size of the python heap. Must be a multiple of 4. The heap will grow by doubling -this initial size until the outer heap cannot fit it. Larger values will reserve more RAM for python -use and prevent the supervisor and SDK from large allocations of their own. Smaller values will -likely grow sooner than large start sizes. +Sets the initial size of the python heap, allocated from the outer heap. Must be a multiple of 4. +The default is currently 8192. +The python heap will grow by doubling and redoubling this initial size until it cannot fit in the outer heap. +Larger values will reserve more RAM for python use and prevent the supervisor and SDK +from large allocations of their own. +Smaller values will likely grow sooner than large start sizes. CIRCUITPY_PYSTACK_SIZE ~~~~~~~~~~~~~~~~~~~~~~ From 2eb283004d19f787e3e0b50ef862160a410d571e Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 10 Nov 2023 20:27:32 -0500 Subject: [PATCH 3/3] fix title underline --- docs/environment.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/environment.rst b/docs/environment.rst index 704c8ebdcf..d29cb2a618 100644 --- a/docs/environment.rst +++ b/docs/environment.rst @@ -61,7 +61,7 @@ CIRCUITPY_BLE_NAME Default BLE name the board advertises as, including for the BLE workflow. CIRCUITPY_HEAP_START_SIZE -~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~ Sets the initial size of the python heap, allocated from the outer heap. Must be a multiple of 4. The default is currently 8192. The python heap will grow by doubling and redoubling this initial size until it cannot fit in the outer heap.