Scheduler returns unexpectedly

It is also possible to run into issues with vStartScheduler returning this:

//start the scheduler - shouldn't return unless there's a problem
vTaskStartScheduler();

//if you've wound up here, there is likely
//an issue with overrunning the freeRTOS heap
while(1)
{
}

This is simply another symptom of the same underlying issue inadequate heap space. The scheduler defines an IDLE task that requires configMINIMAL_STACK_SIZE words of heap space (plus room for the TCB).

If you're reading this section because you actually have a program that isn't starting and you're not experiencing either of these symptoms, do not worry! There's an entire chapter in the back of this book, just for you. Check out Chapter 17, Troubleshooting Tips and Next Steps. It was actually created from real-world problems that were encountered during the creation of the example code in this book.

There are a few more considerations to be made if you have an application that is refusing to start.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.23.30