Add symbol needed for OpenOCD to detect FreeRTOS, add feature to break execution when the scheduler is initially started.

This commit is contained in:
Jeroen Domburg
2016-08-24 12:23:58 +08:00
parent a44c45e63e
commit bdf4b27e38
8 changed files with 50 additions and 10 deletions

View File

@@ -445,6 +445,11 @@ to its original value when it is released. */
extern void vApplicationTickHook( void );
#endif
#if portFIRST_TASK_HOOK
extern void vPortFirstTaskHook(TaskFunction_t taskfn);
#endif
/* File private functions. --------------------------------*/
/*
@@ -707,6 +712,12 @@ BaseType_t i;
/* Schedule if nothing is scheduled yet, or overwrite a task of lower prio. */
if ( pxCurrentTCB[i] == NULL || pxCurrentTCB[i]->uxPriority <= uxPriority )
{
#if portFIRST_TASK_HOOK
if ( i == 0) {
vPortFirstTaskHook(pxTaskCode);
}
#endif /* configFIRST_TASK_HOOK */
pxCurrentTCB[i] = pxNewTCB;
break;
}