|
|
|
@ -9,6 +9,44 @@ The contents of this branch will remain available for certain period but we will
|
|
|
|
|
Have more questions? Post them in the [FreeRTOS forum](https://forums.freertos.org/).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Migrate port from SMP branch to FreeRTOS v11
|
|
|
|
|
|
|
|
|
|
The following changes should be applied to migrate a port from this branch to FreeRTOS v11:
|
|
|
|
|
|
|
|
|
|
* Call `xTaskIncrementTick` in critical section in port
|
|
|
|
|
|
|
|
|
|
RP2040 example:
|
|
|
|
|
```c
|
|
|
|
|
void xPortSysTickHandler( void )
|
|
|
|
|
{
|
|
|
|
|
portBASE_TYPE xPreviousMask;
|
|
|
|
|
|
|
|
|
|
/* xTaskIncrementTick now must be called in critical section. */
|
|
|
|
|
xPreviousMask = taskENTER_CRITICAL_FROM_ISR();
|
|
|
|
|
{
|
|
|
|
|
/* Increment the RTOS tick. */
|
|
|
|
|
if( xTaskIncrementTick() != pdFALSE )
|
|
|
|
|
{
|
|
|
|
|
/* Pend a context switch. */
|
|
|
|
|
portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
taskEXIT_CRITICAL_FROM_ISR( xPreviousMask );
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* Rename `configNUM_CORES` to `configNUMBER_OF_CORES`
|
|
|
|
|
|
|
|
|
|
* Define `portSET/CLEAR_INTERRUPT_MASK` in port
|
|
|
|
|
|
|
|
|
|
* Define `portENTER/EXIT_CRITICAL_FROM_ISR` for SMP in port
|
|
|
|
|
* These macros should be implemented with `vTaskEnterCriticalFromISR`/`xTaskExitCriticalFromISR`
|
|
|
|
|
|
|
|
|
|
* Update `portSET/CLEAR_INTERRUPT_MASK_FROM_ISR` implementation in port
|
|
|
|
|
* SMP-dev doesn’t use these macros to enter/exit critical section from ISR. Instead,
|
|
|
|
|
`portENTER/EXIT_CRITICAL_FROM_ISR` are used. These functions should be implemented as
|
|
|
|
|
the macro name suggested, set or clear interrupt mask from ISR if nested interrupt are supported.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|