diff --git a/portable/Common/mpu_wrappers_v2.c b/portable/Common/mpu_wrappers_v2.c index e92aca0f5..9f9fa43ea 100644 --- a/portable/Common/mpu_wrappers_v2.c +++ b/portable/Common/mpu_wrappers_v2.c @@ -1059,8 +1059,8 @@ configRUN_TIME_COUNTER_TYPE * pulTotalRunTime ) /* PRIVILEGED_FUNCTION */ { UBaseType_t uxReturn = 0; - UBaseType_t xIsTaskStatusArrayWriteable = pdFALSE; - UBaseType_t xIsTotalRunTimeWriteable = pdFALSE; + BaseType_t xIsTaskStatusArrayWriteable = pdFALSE; + BaseType_t xIsTotalRunTimeWriteable = pdFALSE; uint32_t ulArraySize = ( uint32_t ) uxArraySize; uint32_t ulTaskStatusSize = ( uint32_t ) sizeof( TaskStatus_t ); diff --git a/tasks.c b/tasks.c index 24cfb2620..a3d585ed0 100644 --- a/tasks.c +++ b/tasks.c @@ -3676,6 +3676,9 @@ static BaseType_t prvCreateIdleTasks( void ) /* Assign idle task to each core before SMP scheduler is running. */ xIdleTaskHandles[ xCoreID ]->xTaskRunState = xCoreID; pxCurrentTCBs[ xCoreID ] = xIdleTaskHandles[ xCoreID ]; + #if ( configUSE_CORE_AFFINITY == 1 ) + vTaskCoreAffinitySet(xIdleTaskHandles[ xCoreID ], 1 << xCoreID); + #endif } #endif }