Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 9 months ago.
How To use freertos for stm32f030r8 project?
freertos_test
https://os.mbed.com/users/chalikias/code/freertos_test/
The examples can not run on stm32f030r8
- include "mbed.h"
- include "FreeRTOS.h"
- include "task.h"
DigitalOut led1(PB_3); DigitalOut led2(PB_4); Serial pc(PA_9,PA_10);
void Task1 (void* pvParameters) { (void) pvParameters; Just to stop compiler warnings. for (;;) { led1 = !led1; pc.printf("Task1\n"); vTaskDelay(500); } }
void Task2 (void* pvParameters) { (void) pvParameters; Just to stop compiler warnings. for (;;) { led2= !led2; pc.printf("Task2\n"); vTaskDelay(5000); } }
int main (void) { pc.BAUD(115200); xTaskCreate( Task1, ( signed char * ) "Task1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); xTaskCreate( Task2, ( signed char * ) "Task2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, ( xTaskHandle * ) NULL ); vTaskStartScheduler(); should never get here pc.printf("ERORR: vTaskStartScheduler returned!"); for (;;); }