Based on the examples from the book, I created a program with three tasks and a queue. The fist task receives numbers from the queue and does printf to the terminal. The second receives numbers from the terminal and places them on the queue. The third just flashes some LEDs.
The priorities are 3, 2 and 1 respectively.
The program only executes one task, which is that task that is created first in main(). I figured this out after commenting xTaskCreate(…) calls and seeing that the next task took over the execution. I hav tried taskYIELD() and vTaskDelay() to see if I can force a switch and nothing happens.
For instance, I know first task should block waiting for the second task to post something on the queue. It does block (tried portDELAY_MAX, and other values. However there is no context switch to the second task.
On the second task I have used vTaskDelay() to let the third task run and it does switch.
If I shuffle the xTaskCreate(…) statements in main, only the fist task created gets executed even if it has the lowest priority!
I feel I am not configuring something correctly. However I do have the following on FreeRTOSConfig.h
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelayUntil 1
#define INCLUDE_vTaskDelay 1
Any help would be appreciated.