How to allocate memory for Threads?

Hi,
I’m developing a firmware using Thread API. But I have no idea how to allocate memory OS_STACK_SIZE s for Thread (Thread (osPriority priority=osPriorityNormal, uint32_t stack_size=OS_STACK_SIZE, unsigned char *stack_mem=nullptr, const char *name=nullptr)). Can someone explain me how to allocate memory for Threads?

regards,
Vijan.

Hello,

BR, Jan

1 Like