remvoe main as thread of cmsis rtx for portability.
Keil & lpcxpresso4 host_cmsis_rtx work well
This commit is contained in:
@@ -89,6 +89,10 @@ void os_none_start_scheduler(void)
|
||||
|
||||
int main(void)
|
||||
{
|
||||
#if TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
|
||||
osKernelInitialize(); // CMSIS RTX requires kernel init before any other OS functions
|
||||
#endif
|
||||
|
||||
board_init();
|
||||
print_greeting();
|
||||
|
||||
@@ -109,10 +113,7 @@ int main(void)
|
||||
#elif TUSB_CFG_OS == TUSB_OS_NONE
|
||||
os_none_start_scheduler();
|
||||
#elif TUSB_CFG_OS == TUSB_OS_CMSIS_RTX
|
||||
while(1)
|
||||
{
|
||||
osDelay(osWaitForever); // CMSIS RTX osKernelStart already started, main() is a task
|
||||
}
|
||||
osKernelStart();
|
||||
#else
|
||||
#error need to start RTOS schduler
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user