File tree Expand file tree Collapse file tree 21 files changed +189
-21
lines changed Expand file tree Collapse file tree 21 files changed +189
-21
lines changed Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
Original file line number Diff line number Diff line change @@ -1906,7 +1906,15 @@ void vPortEndScheduler( void ) /* PRIVILEGED_FUNCTION */
1906
1906
BaseType_t xAccessGranted = pdFALSE ;
1907
1907
const xMPU_SETTINGS * xTaskMpuSettings = xTaskGetMPUSettings ( NULL ); /* Calling task's MPU settings. */
1908
1908
1909
- if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1909
+ if ( xSchedulerRunning == pdFALSE )
1910
+ {
1911
+ /* Grant access to all the kernel objects before the scheduler
1912
+ * is started. It is necessary because there is no task running
1913
+ * yet and therefore, we cannot use the permissions of any
1914
+ * task. */
1915
+ xAccessGranted = pdTRUE ;
1916
+ }
1917
+ else if ( ( xTaskMpuSettings -> ulTaskFlags & portTASK_IS_PRIVILEGED_FLAG ) == portTASK_IS_PRIVILEGED_FLAG )
1910
1918
{
1911
1919
xAccessGranted = pdTRUE ;
1912
1920
}
You can’t perform that action at this time.
0 commit comments