ucMaxPriorityValue <<= ( uint8_t ) 0x01;\r
}\r
\r
+ #ifdef __NVIC_PRIO_BITS\r
+ {\r
+ /* Check the CMSIS configuration that defines the number of\r
+ priority bits matches the number of priority bits actually queried\r
+ from the hardware. */\r
+ configASSERT( ( portMAX_PRIGROUP_BITS - ulMaxPRIGROUPValue ) == __NVIC_PRIO_BITS );\r
+ }\r
+ #endif\r
+\r
+ #ifdef configPRIO_BITS\r
+ {\r
+ /* Check the FreeRTOS configuration that defines the number of\r
+ priority bits matches the number of priority bits actually queried\r
+ from the hardware. */\r
+ configASSERT( ( portMAX_PRIGROUP_BITS - ulMaxPRIGROUPValue ) == configPRIO_BITS );\r
+ }\r
+ #endif\r
+\r
/* Shift the priority group value back to its position within the AIRCR\r
register. */\r
ulMaxPRIGROUPValue <<= portPRIGROUP_SHIFT;\r
{\r
PRESERVE8\r
\r
- ldr r0, =0xE000ED08 /* Use the NVIC offset register to locate the stack. */\r
+ /* Use the NVIC offset register to locate the stack. */\r
+ ldr r0, =0xE000ED08\r
ldr r0, [r0]\r
ldr r0, [r0]\r
- msr msp, r0 /* Set the msp back to the start of the stack. */\r
- cpsie i /* Globally enable interrupts. */\r
+ /* Set the msp back to the start of the stack. */\r
+ msr msp, r0\r
+ /* Clear the bit that indicates the FPU is in use in case the FPU was used\r
+ before the scheduler was started - which would otherwise result in the\r
+ unnecessary leaving of space in the SVC stack for lazy saving of FPU\r
+ registers. */\r
+ mov r0, #0\r
+ msr control, r0\r
+ /* Globally enable interrupts. */\r
+ cpsie i\r
cpsie f\r
dsb\r
isb\r