Skip to content

Increase stack size to 8192 bytes #8652

Answered by earlephilhower
lmarmisa asked this question in Q&A
Discussion options

You must be logged in to vote

-edit, wrong core! -

What I do for BearSSL which needs 6K+ of stack, is to just allocate a per-module stack and use stack thunking to swap stacks on-the-fly. Regular code runs normally. but when you call the SSL commands (or, say, your global parser routine) the SP is set to a new value in DRAM, the routine is called, and then the SP is reset back to the original value.

See https://github.com/esp8266/Arduino/blob/master/cores/esp8266/StackThunk.cpp and https://github.com/esp8266/Arduino/blob/master/cores/esp8266/StackThunk.h

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@lmarmisa
Comment options

@lmarmisa
Comment options

@earlephilhower
Comment options

@lmarmisa
Comment options

Answer selected by lmarmisa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants