Skip to content

Commit b508e41

Browse files
authored
Merge pull request #10236 from dhalbert/increase-pystack
increase default PYSTACK size from 1536 to 2048
2 parents 63815c5 + 641ab0d commit b508e41

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

ports/atmel-samd/mpconfigport.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@
100100
#define CIRCUITPY_DEFAULT_STACK_SIZE 3584
101101
#endif
102102

103+
#ifndef CIRCUITPY_PYSTACK_SIZE
104+
// Default for most boards is 2048 starting with CircuitPython 10, but on SAMD21, keep it at previous lower value.
105+
#define CIRCUITPY_PYSTACK_SIZE 1536
106+
#endif
107+
103108
#ifndef SAMD21_BOD33_LEVEL
104109
// Set brownout detection to ~2.7V. Default from factory is 1.7V,
105110
// which is too low for proper operation of external SPI flash chips

ports/nordic/boards/TG-Watch/mpconfigboard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define MICROPY_HW_MCU_NAME "nRF52840"
1414

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

1818
// the board has a 32mhz crystal but NOT a 32khz one
1919
#define BOARD_HAS_32KHZ_XTAL 0

py/circuitpy_mpconfig.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ void background_callback_run_all(void);
452452
#endif
453453

454454
#ifndef CIRCUITPY_PYSTACK_SIZE
455-
#define CIRCUITPY_PYSTACK_SIZE 1536
455+
#define CIRCUITPY_PYSTACK_SIZE 2048
456456
#endif
457457

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

0 commit comments

Comments
 (0)