Hello,
I'm currently trying to enable static buffer for MBedTLS as described here: https://tls.mbed.org/kb/how-to/using-static-memory-instead-of-the-heap.
I wrote a simple hello world example to test it out:
#include <zephyr.h> #include <kernel.h> #include <sys/printk.h> #include <mbedtls/memory_buffer_alloc.h> unsigned char mbedtls_static_buffer[4096]; void main(void) { mbedtls_memory_buffer_alloc_init(mbedtls_static_buffer, sizeof(mbedtls_static_buffer)); printk("Hello World!\n"); }
Clearly there is a problem with my prj.conf but I can't figure it out.
prj.conf
CONFIG_NRF_SECURITY=y CONFIG_MBEDTLS=y
During build I got an linker error:
undefined reference to `mbedtls_memory_buffer_alloc_init'
although it seems to be enabled:
Symbol information Name: MBEDTLS_MEMORY_BUFFER_ALLOC_C Type: bool Value: y
I'm working on Ubuntu 20.04 with nrfconnect version 1.9.0.
Can someone point out to me how to enable this?
Thanks