0
0
FreeRTOSprogramming~10 mins

vTaskList() for task status dump in FreeRTOS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to declare a buffer for vTaskList output.

FreeRTOS
char [1][512];
Drag options to blanks, or click blank then click option'
AtaskListBuffer
BstatusBuffer
CtaskStatus
Dbuffer
Attempts:
3 left
💡 Hint
Common Mistakes
Using an integer array instead of char array.
Not declaring a buffer at all.
2fill in blank
medium

Complete the code to call vTaskList with the buffer.

FreeRTOS
vTaskList([1]);
Drag options to blanks, or click blank then click option'
AstatusBuffer
BtaskListBuffer
CtaskStatus
Dbuffer
Attempts:
3 left
💡 Hint
Common Mistakes
Passing an uninitialized or wrong variable.
Passing a pointer to an integer instead of char array.
3fill in blank
hard

Fix the error in printing the task list buffer.

FreeRTOS
printf("[1]", taskListBuffer);
Drag options to blanks, or click blank then click option'
A%s
B%d
C%f
D%c
Attempts:
3 left
💡 Hint
Common Mistakes
Using %d or %f which are for numbers.
Using %c which is for single characters.
4fill in blank
hard

Fill both blanks to declare and initialize the buffer size for vTaskList.

FreeRTOS
char [1][[2]];
Drag options to blanks, or click blank then click option'
AtaskListBuffer
B512
C256
DstatusBuffer
Attempts:
3 left
💡 Hint
Common Mistakes
Using too small buffer size like 256.
Using generic names like 'buffer' or 'statusBuffer'.
5fill in blank
hard

Fill all three blanks to declare buffer, call vTaskList, and print the result.

FreeRTOS
char [1][[2]];
vTaskList([3]);
printf("%s", [3]);
Drag options to blanks, or click blank then click option'
AtaskListBuffer
B512
DstatusBuffer
Attempts:
3 left
💡 Hint
Common Mistakes
Using different variable names for buffer and printing.
Using incorrect buffer size.