The server task stack usage immediately at statup seems to depend on the ApiMessage size.
Printing the stack watermark at this spot:
|
ESP_LOGI(TAG, "Got websocket upgrade request"); |
reports different values depening on the size of the API message struct. This doesn't make sense, as at this point in the execution, the server has not interacted with any API messages yet. It has pointers to the input and output queues, which do not depend on the size of the message.
This function also decodes the messages later on, maybe the stack for those calls gets allocated on entry to the function?
Sprinkle some more watermark prints to work out what is going on.
The server task stack usage immediately at statup seems to depend on the ApiMessage size.
Printing the stack watermark at this spot:
ShrapnelMonorepo/firmware/components/server/src/server.cpp
Line 118 in b98fe17
reports different values depening on the size of the API message struct. This doesn't make sense, as at this point in the execution, the server has not interacted with any API messages yet. It has pointers to the input and output queues, which do not depend on the size of the message.
This function also decodes the messages later on, maybe the stack for those calls gets allocated on entry to the function?
Sprinkle some more watermark prints to work out what is going on.