Multithreaded programs using event flags
This recipe will illustrate how to use CMSIS-RTOS to make an LED blink. We'll define two tasks or threads. The job of one task is to switch the LED ON, and the other one is to switch it OFF. The ON and OFF events are triggered by the tasks sending messages to each other. CMSIS-RTOS supports a number of intertask-communication strategies; our program uses event flags. We can illustrate our program using a state diagram, as follows:
We'll call our first recipe,
How to do it…
Create a new project (in a new folder) named
RTOS_Binky and use the Run-Time Environment manager to select Board Support ...