Skip to content

increase default PYSTACK size from 1536 to 2048 #10236

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ports/atmel-samd/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,11 @@
#define CIRCUITPY_DEFAULT_STACK_SIZE 3584
#endif

#ifndef CIRCUITPY_PYSTACK_SIZE
// Default for most boards is 2048 starting with CircuitPython 10, but on SAMD21, keep it at previous lower value.
#define CIRCUITPY_PYSTACK_SIZE 1536
#endif

#ifndef SAMD21_BOD33_LEVEL
// Set brownout detection to ~2.7V. Default from factory is 1.7V,
// which is too low for proper operation of external SPI flash chips
Expand Down
2 changes: 1 addition & 1 deletion ports/nordic/boards/TG-Watch/mpconfigboard.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define MICROPY_HW_MCU_NAME "nRF52840"

// TG-Gui requires a deeper call stack than normal CircuitPython, this is intentional overkill
#define CIRCUITPY_PYSTACK_SIZE 8192 // 1536 is the normal size, (32 bytes/frame * 48 frames)
#define CIRCUITPY_PYSTACK_SIZE 8192

// the board has a 32mhz crystal but NOT a 32khz one
#define BOARD_HAS_32KHZ_XTAL 0
Expand Down
2 changes: 1 addition & 1 deletion py/circuitpy_mpconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ void background_callback_run_all(void);
#endif

#ifndef CIRCUITPY_PYSTACK_SIZE
#define CIRCUITPY_PYSTACK_SIZE 1536
#define CIRCUITPY_PYSTACK_SIZE 2048
#endif

// The VM heap starts at this size and doubles in size as needed until it runs
Expand Down
Loading