Skip to content

Commit ef9412a

Browse files
committed
Make IP task priority check aware of MPU config
1 parent cad1f75 commit ef9412a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

source/include/FreeRTOSIPConfigDefaults.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,8 +1162,14 @@ STATIC_ASSERT( pdMS_TO_TICKS( ipconfigPHY_LS_LOW_CHECK_TIME_MS ) <= portMAX_DELA
11621162
#error ipconfigIP_TASK_PRIORITY must be at least 0
11631163
#endif
11641164

1165-
#if ( ipconfigIP_TASK_PRIORITY > ( configMAX_PRIORITIES - 1 ) )
1166-
#error ipconfigIP_TASK_PRIORITY must be at most configMAX_PRIORITIES - 1
1165+
#if (configENABLE_MPU != 0)
1166+
#if ( ipconfigIP_TASK_PRIORITY > ( ( configMAX_PRIORITIES - 1 ) | portPRIVILEGE_BIT ) )
1167+
#error ipconfigIP_TASK_PRIORITY must be at most ( ( configMAX_PRIORITIES - 1 ) | portPRIVILEGE_BIT ) )
1168+
#endif
1169+
#else
1170+
#if ( ipconfigIP_TASK_PRIORITY > ( configMAX_PRIORITIES - 1 ) )
1171+
#error ipconfigIP_TASK_PRIORITY must be at most configMAX_PRIORITIES - 1
1172+
#endif
11671173
#endif
11681174

11691175
/*---------------------------------------------------------------------------*/

0 commit comments

Comments
 (0)