|
|
|
@ -353,6 +353,12 @@ portBASE_TYPE xPortStartScheduler( void )
|
|
|
|
|
/* Start the first task. */
|
|
|
|
|
prvPortStartFirstTask();
|
|
|
|
|
|
|
|
|
|
/* Should never get here as the tasks will now be executing! Call the task
|
|
|
|
|
exit error function to prevent compiler warnings about a static function
|
|
|
|
|
not being called in the case that the application writer overrides this
|
|
|
|
|
functionality by defining configTASK_RETURN_ADDRESS. */
|
|
|
|
|
prvTaskExitError();
|
|
|
|
|
|
|
|
|
|
/* Should not get here! */
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
@ -446,13 +452,13 @@ void xPortPendSVHandler( void )
|
|
|
|
|
" \n"
|
|
|
|
|
" str r0, [r2] \n" /* Save the new top of stack into the first member of the TCB. */
|
|
|
|
|
" \n"
|
|
|
|
|
" stmdb sp!, {r3, r14} \n"
|
|
|
|
|
" stmdb sp!, {r3} \n"
|
|
|
|
|
" mov r0, %0 \n"
|
|
|
|
|
" msr basepri, r0 \n"
|
|
|
|
|
" bl vTaskSwitchContext \n"
|
|
|
|
|
" mov r0, #0 \n"
|
|
|
|
|
" msr basepri, r0 \n"
|
|
|
|
|
" ldmia sp!, {r3, r14} \n"
|
|
|
|
|
" ldmia sp!, {r3} \n"
|
|
|
|
|
" \n"
|
|
|
|
|
" ldr r1, [r3] \n" /* The first item in pxCurrentTCB is the task top of stack. */
|
|
|
|
|
" ldr r0, [r1] \n"
|
|
|
|
|