File tree Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Expand file tree Collapse file tree 1 file changed +38
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,44 @@ The contents of this branch will remain available for certain period but we will
9
9
Have more questions? Post them in the [ FreeRTOS forum] ( https://forums.freertos.org/ ) .
10
10
11
11
12
+ ## Migrate port from SMP branch to FreeRTOS v11
13
+
14
+ The following changes should be applied to migrate a port from this branch to FreeRTOS v11:
15
+
16
+ * Call ` xTaskIncrementTick ` in critical section in port
17
+
18
+ RP2040 example:
19
+ ``` c
20
+ void xPortSysTickHandler ( void )
21
+ {
22
+ portBASE_TYPE xPreviousMask;
23
+
24
+ /* xTaskIncrementTick now must be called in critical section. */
25
+ xPreviousMask = taskENTER_CRITICAL_FROM_ISR();
26
+ {
27
+ /* Increment the RTOS tick. */
28
+ if( xTaskIncrementTick() != pdFALSE )
29
+ {
30
+ /* Pend a context switch. */
31
+ portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT;
32
+ }
33
+ }
34
+ taskEXIT_CRITICAL_FROM_ISR( xPreviousMask );
35
+ }
36
+ ```
37
+
38
+ * Rename `configNUM_CORES` to `configNUMBER_OF_CORES`
39
+
40
+ * Define `portSET/CLEAR_INTERRUPT_MASK` in port
41
+
42
+ * Define `portENTER/EXIT_CRITICAL_FROM_ISR` for SMP in port
43
+ * These macros should be implemented with `vTaskEnterCriticalFromISR`/`xTaskExitCriticalFromISR`
44
+
45
+ * Update `portSET/CLEAR_INTERRUPT_MASK_FROM_ISR` implementation in port
46
+ * SMP-dev doesn’t use these macros to enter/exit critical section from ISR. Instead,
47
+ `portENTER/EXIT_CRITICAL_FROM_ISR` are used. These functions should be implemented as
48
+ the macro name suggested, set or clear interrupt mask from ISR if nested interrupt are supported.
49
+
12
50
13
51
---
14
52
You can’t perform that action at this time.
0 commit comments