Trouble Creating a Thread on AVR32UC with Zephyr – Any Tips?

Hey guys, I'm trying to create a new thread on my AVR32UC using Zephyr OS, but the thread isn't being created as expected.
Here's my code:
#include <zephyr.h>

void thread_function(void) {
    printk("Thread started\n");
}

K_THREAD_DEFINE(my_thread, STACK_SIZE, thread_function, NULL, NULL, NULL, PRIORITY, 0, 0);
The error:

error: Thread creation failed due to insufficient resources

I've tried increasing the stack size and lowering the priority, but the issue persists. Any advice?
Solution
Yes, this is the code for creating the thread. I don't have any complicated initialization code that might be causing a lock. thankz tho
Was this page helpful?