Files
TencentOS-tiny/board/NUCLEO_STM32F401RE/BSP/Src/main.c
squallbest b4c4b81f9f NUCLEO_STM32F401RE
Signed-off-by: squallbest <squall@live0415.com>
2019-10-12 14:58:40 +08:00

24 lines
566 B
C

#include "mcu_init.h"
#include "cmsis_os.h"
#define APPLICATION_TASK_STK_SIZE 1024
extern void application_entry(void *arg);
osThreadDef(application_entry, osPriorityNormal, 1, APPLICATION_TASK_STK_SIZE);
__weak void application_entry(void *arg)
{
while (1) {
printf("This is a demo task,please use your task entry!\r\n");
tos_task_delay(1000);
}
}
int main(void)
{
board_init();
printf("Welcome to TencentOS tiny\r\n");
osKernelInitialize();
osThreadCreate(osThread(application_entry), NULL);
osKernelStart();
}