/*---------------------------------------------------------------------------- * CMSIS-RTOS 'main' function template *---------------------------------------------------------------------------*/ #include "RTE_Components.h" #include CMSIS_device_header #include "cmsis_os2.h" #include "EventRecorder.h" /*---------------------------------------------------------------------------- * Application main thread *---------------------------------------------------------------------------*/ __NO_RETURN static void app_main (void *argument) { (void)argument; // ... for (;;) {} } void task1(void *args) { (void)args; for(;;) {} } __NO_RETURN static void task2(void *args) { (void)args; for(;;) {} } __NO_RETURN static void task3(void *args) { (void)args; for(;;) {} } int main (void) { // System Initialization SystemCoreClockUpdate(); EventRecorderInitialize(EventRecordAll, 1U); osKernelInitialize(); // Initialize CMSIS-RTOS thread1 = osThreadNew(app_main, NULL, NULL); // Create application main thread osThreadNew(task1, NULL, NULL); osThreadNew(task2, NULL, NULL); osThreadNew(task3, NULL, NULL); osKernelStart(); // Start thread execution for (;;) {} }