mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Create dummy pxCurrentTCBs for xcore.ai port
This commit is contained in:
parent
47e47e7670
commit
50958c1659
22
portable/ThirdParty/xClang/XCOREAI/port.c
vendored
22
portable/ThirdParty/xClang/XCOREAI/port.c
vendored
|
@ -12,6 +12,17 @@ static hwtimer_t xKernelTimer;
|
||||||
|
|
||||||
uint32_t ulPortYieldRequired[ portMAX_CORE_COUNT ] = { pdFALSE };
|
uint32_t ulPortYieldRequired[ portMAX_CORE_COUNT ] = { pdFALSE };
|
||||||
|
|
||||||
|
#if ( configNUMBER_OF_CORES == 1 )
|
||||||
|
/* This port was written assuming that pxCurrentTCBs always exists and that, in
|
||||||
|
single-core FreeRTOS, it would just have simply one element. That is not the
|
||||||
|
case in v11 - in single-core FreeRTOS the symbol pxCurrentTCB is defined
|
||||||
|
instead. This breaks this port in a number of ways. A quick solution is to
|
||||||
|
define pxCurrentTCBs here - it simply needs to be a pointer to pxCurrentTCB.
|
||||||
|
We will actually populate this pointer in the RTOS kernel entry function.
|
||||||
|
*/
|
||||||
|
void * pxCurrentTCBs;
|
||||||
|
#endif
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
void vIntercoreInterruptISR( void )
|
void vIntercoreInterruptISR( void )
|
||||||
|
@ -140,6 +151,17 @@ DEFINE_RTOS_KERNEL_ENTRY( void, vPortStartSchedulerOnCore, void )
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ( configNUMBER_OF_CORES == 1 )
|
||||||
|
{
|
||||||
|
asm volatile (
|
||||||
|
"ldaw %0, dp[pxCurrentTCB]\n\t"
|
||||||
|
: "=r"(pxCurrentTCBs)
|
||||||
|
: /* no inputs */
|
||||||
|
: /* no clobbers */
|
||||||
|
);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
debug_printf( "FreeRTOS Core %d initialized\n", xCoreID );
|
debug_printf( "FreeRTOS Core %d initialized\n", xCoreID );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue