- Use FreeRTOS APIs to create a task.
FreeRTOS Tasks are implemented as C functions which must have the following prototype:
void TaskFunction( void *pvParameters );
Each task normally runs forever within an infinite loop, and does not exit. The structure of a typical task is shown below:
void TaskFunction( void *pvParameters )
{
/* A task is normally implemented as an infinite loop. */
for( ;; )
{
/* The code to implement the task functionality goes here. */
}
}
-
Complete all the TODOs in the
source/tutorials/tutorial_2/source/tutorial_2.c
file. -
Execute the following commands from the root of the repository to build:
rm -rf build mkdir build cd build cmake -B . -S ../source/ -DTUTORIAL=2 make
-
Execute the following command to run the binary:
./freertos_example