Hi everyone,
We were able to identify the root cause of the issue we were experiencing. The problem was due to a RAM test in our application that, at a certain point during execution, corrupted the memory region where wolfSSL was dynamically allocating its buffers and data structures, leading to transmission issues.
We have now switched from dynamic to static memory allocation, and everything is working correctly.
At this point, we would like to understand if there is a recommended method to determine the required size of the static memory used by wolfSSL for its buffers and data structures.
Currently, we are using a rather memory-intensive configuration:
(Stack max size = 0x4000)
#define WOLFSSL_NO_MALLOC
#define WOLFSSL_STATIC_MEMORY
#undef WOLFSSL_SMALL_STACK
#define GEN_MEM_SIZE (80 * 1024)
#define IO_MEM_SIZE (50 * 1024)
unsigned char GEN_MEM[GEN_MEM_SIZE];
unsigned char IO_MEM[IO_MEM_SIZE];
Any guidance on how to properly size these buffers would be greatly appreciated.
Thank you!