Hi,
Thank you for your reply. Please refer to the codebase used in this Pull Request for guidance: https://github.com/wolfSSL/wolfssl/pull/6475 (which includes some compile fixes for the reported options).
I ran a quick test with the following configuration options:
./configure --disable-all --enable-tls13 --enable-dtls13 --enable-dtls --enable-psk --disable-dh --disable-ecc --disable-rsa --enable-sp-asm --disable-sha384 --disable-sha512 --disable-sha --disable-sha224 --disable-md5 CFLAGS="-DWOLFSSL_STATIC_PSK -DMAX_PSK_ID_LEN=32 -DWOLFSSL_MAX_MTU=300"
Our memory tool indicates a peak memory usage of around 8-9 KB per connection. The settings above assume the usage of PSK with PSK_KE exchange mode, using the TLS_AES_128_GCM_SHA_256 ciphersuite, and a maximum MTU of ~300 bytes. However, please note that this is a raw number that may vary depending on your application profile and hardware target. I'm confident that if you're not using public key authentication, this number can be further reduced by tailoring it to your application profile.
Using static memory (with `--enable-staticmemory`) unfortunately increases the memory usage due to the fragmentation of a more simple allocator. However, if static memory is mandatory, the impact of fragmentation can be reduced by choosing a bucket allocation size that works better for your application. Please refer to `wolfSSL_StaticBufferSz` for further details.
If you have any additional questions, please feel free to ask.
Regards,
Marco