Use more descriptive error messages for invalid stacks in proc_new()
[bertos.git] / bertos / kern / proc.c
index 781bd5532ab3846c0b5de51f2a5c2f48283fa09f..0bc046f803533999d3f52c46b3ff87b9e6803886 100644 (file)
@@ -323,8 +323,9 @@ struct Process *proc_new_with_name(UNUSED_ARG(const char *, name), void (*entry)
 #else // CONFIG_KERN_HEAP
 
        /* Stack must have been provided by the user */
-       ASSERT_VALID_PTR(stack_base);
-       ASSERT(stack_size);
+       ASSERT2(IS_VALID_PTR(stack_base), "Invalid stack pointer. Did you forget to \
+               enable CONFIG_KERN_HEAP?");
+       ASSERT2(stack_size, "Stack size cannot be 0.");
 
 #endif // CONFIG_KERN_HEAP