Skip to content

CIRCUITPY_PYSTACK_SIZE=4000 crashes ESP32S3 boards to safe mode #7643

Closed
@RetiredWizard

Description

@RetiredWizard

CircuitPython version

Adafruit CircuitPython 8.1.0-alpha.2-17-g00a03c323 on 2023-02-23; Adafruit Feather ESP32S3 4MB Flash 2MB PSRAM with ESP32S3
Adafruit CircuitPython 8.1.0-alpha.2-17-g00a03c323 on 2023-02-23; BPI-PicoW-S3 with ESP32S3

Code/REPL

No code.py file is executed.

Behavior

On esp32s3 boards setting CIRCUITPY_PYSTACK_SIZE=4000 causes a crash into safe mode.

Auto-reload is off.
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Fault detected by hardware.
Please file an issue with your program at https://github.com/adafruit/circuitpython/issues.
Press reset to exit safe mode.

Press any key to enter the REPL. Use CTRL-D to reload.

A value of 3500 works fine.

Description

I've used values up to 7000 on a board with the raspberry pi RP2040 micro controller without a similar crash.

This may be a total red herring but building with micropy_stackless=1 prevents the crash, however setting CIRCUITPY_PYSTACK_SIZE > 3500 still doesn't seem to improve the stack limitations (EDIT: I'm not sure about this now, my stack depth test may have been faulty). I remember @bill88t mentioning that on some boards the parameter had an effective upper limit but I can't find the note right now. Perhaps the ESP32S3 was one of those boards.

Additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions