Skip to content

Commit d882ff6

Browse files
committed
samd51: Set stack size to 8k
This is necessary in order to run unittest. Heavy tests like those in the stdlib need 12-14k.
1 parent 1b86e5f commit d882ff6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ports/atmel-samd/mpconfigport.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ typedef long mp_off_t;
139139
#define CIRCUITPY_MCU_FAMILY samd21
140140
#define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21"
141141
#define PORT_HEAP_SIZE (16384 + 4096)
142+
#define CIRCUITPY_DEFAULT_STACK_SIZE 4096
142143
#define MICROPY_CPYTHON_COMPAT (0)
143144
#define MICROPY_MODULE_WEAK_LINKS (0)
144145
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
@@ -153,6 +154,7 @@ typedef long mp_off_t;
153154
#define CIRCUITPY_MCU_FAMILY samd51
154155
#define MICROPY_PY_SYS_PLATFORM "MicroChip SAMD51"
155156
#define PORT_HEAP_SIZE (0x20000) // 128KiB
157+
#define CIRCUITPY_DEFAULT_STACK_SIZE 8192
156158
#define MICROPY_CPYTHON_COMPAT (1)
157159
#define MICROPY_MODULE_WEAK_LINKS (1)
158160
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1)
@@ -400,8 +402,4 @@ void run_background_tasks(void);
400402
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
401403
#define CIRCUITPY_BOOT_OUTPUT_FILE "/boot_out.txt"
402404

403-
// TODO(tannewt): Make this 6k+ for any non-express M4 boards because they cache sectors on the
404-
// stack.
405-
#define CIRCUITPY_DEFAULT_STACK_SIZE 4096
406-
407405
#endif // __INCLUDED_MPCONFIGPORT_H

0 commit comments

Comments
 (0)