File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,20 @@ msgid ""
3535"https://github.com/adafruit/circuitpython/issues\n"
3636msgstr ""
3737
38+ #: main.c
39+ msgid ""
40+ "\n"
41+ "WARNING: Allocating pystack failed, defaulting back to build value. \n"
42+ "\n"
43+ msgstr ""
44+
45+ #: main.c
46+ msgid ""
47+ "\n"
48+ "WARNING: Invalid CIRCUITPY_PYSTACK_SIZE, defaulting back to build value.\n"
49+ "\n"
50+ msgstr ""
51+
3852#: py/obj.c
3953msgid " File \" %q\" "
4054msgstr ""
Original file line number Diff line number Diff line change @@ -141,12 +141,15 @@ STATIC supervisor_allocation __attribute__ ((noinline)) * alloc_pystack(void) {
141141 (void )common_hal_os_getenv_int ("CIRCUITPY_PYSTACK_SIZE" , & pystack_size );
142142 // Check if value is valid
143143 if ((CIRCUITPY_PYSTACK_SIZE != pystack_size ) && ((pystack_size < 384 ) || (pystack_size % sizeof (size_t ) != 0 ))) {
144+ serial_write_compressed (translate ("\nWARNING: Invalid CIRCUITPY_PYSTACK_SIZE, defaulting back to build value.\n\n" ));
144145 pystack_size = CIRCUITPY_PYSTACK_SIZE ; // Reset
145- // TODO: Find a way to inform the user about it.
146- // Perhaps safemode? Or is it too much?
147146 }
148147 #endif
149148 supervisor_allocation * pystack = allocate_memory (pystack_size , false, false);
149+ if (pystack == NULL ) {
150+ serial_write_compressed (translate ("\nWARNING: Allocating pystack failed, defaulting back to build value. \n\n" ));
151+ pystack = allocate_memory (CIRCUITPY_PYSTACK_SIZE , false, false);
152+ }
150153 return pystack ;
151154}
152155#endif
You can’t perform that action at this time.
0 commit comments