FreeRTOS Idle task.

ammaree
Posts: 39
Joined: Tue Dec 27, 2016 2:10 am

FreeRTOS Idle task.

Postby ammaree » Tue Mar 28, 2017 1:43 pm

Whilst trying to resolve the ESP32 FreeRTOS port issues around the task/processor statistics I have discovered some bugs.

#1 Although provision is made for creating 2 tasks (both ironically named "IDLE") provision for the storing of the idle task handle is only made for storing a single task handle.

#2 As soon as INCLUDE_xTaskGetIdleTaskHandle is set, the compiler flags the error linked to lines 286 and 1995.

#3 Since 2 idle tasks exist provision must be made in xTaskGetIdleTaskHandle() to specify the selected MCU, alternatively the assumption must be made to return the correct handle for the idle task associated with the MCU used by the calling function.

Another option is to simply create a single idle task, and if some MCU specific functionality in prvIdleTask() is to be added it is linked to the parameter passed being the MCU number. Currently the MCU number parameter is passed, but not used in any way in prvIdleTask(). This will also save a couple of KB RAM and make the reporting MCU/OS utilization simpler.

Who is online

Users browsing this forum: No registered users and 44 guests