]> begriffs open source - freertos/blob - README.md
Update SMP branch readme for port migration (#999)
[freertos] / README.md
1 # ![image](https://user-images.githubusercontent.com/56273942/202568467-0ee721bb-1424-4efd-88fc-31b4f2a59dc6.png) DEPRECATED
2
3 ## Announcement:
4
5 FreeRTOS SMP feature has been merged into [FreeRTOS-Kernel](https://github.com/FreeRTOS/FreeRTOS-Kernel/commit/ae3a498e435cecdb25b889f2740ea99027dd0cb1) main branch. We recommend you to use the [FreeRTOS-Kernel](https://github.com/FreeRTOS/FreeRTOS-Kernel/commit/ae3a498e435cecdb25b889f2740ea99027dd0cb1) main branch to develop FreeRTOS SMP applications.
6
7 The contents of this branch will remain available for certain period but we will no longer provide updates or accept new contributions and pull requests.
8
9 Have more questions? Post them in the [FreeRTOS forum](https://forums.freertos.org/).
10
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\92t 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
50
51 ---
52
53 ## Getting started
54 This repository contains FreeRTOS kernel source/header files and kernel ports only. This repository is referenced as a submodule in [FreeRTOS/FreeRTOS](https://github.com/FreeRTOS/FreeRTOS) repository, which contains pre-configured demo application projects under ```FreeRTOS/Demo``` directory. 
55
56 The easiest way to use FreeRTOS is to start with one of the pre-configured demo application projects.  That way you will have the correct FreeRTOS source files included, and the correct include paths configured.  Once a demo application is building and executing you can remove the demo application files, and start to add in your own application source files.  See the [FreeRTOS Kernel Quick Start Guide](https://www.FreeRTOS.org/FreeRTOS-quick-start-guide.html) for detailed instructions and other useful links.
57
58 Additionally, for FreeRTOS kernel feature information refer to the [Developer Documentation](https://www.FreeRTOS.org/features.html), and [API Reference](https://www.FreeRTOS.org/a00106.html).
59
60 ### Getting help
61 If you have any questions or need assistance troubleshooting your FreeRTOS project, we have an active community that can help on the [FreeRTOS Community Support Forum](https://forums.freertos.org).
62
63 ## Cloning this repository
64
65 To clone using HTTPS:
66 ```
67 git clone https://github.com/FreeRTOS/FreeRTOS-Kernel.git
68 ```
69 Using SSH:
70 ```
71 git clone git@github.com:FreeRTOS/FreeRTOS-Kernel.git
72 ```
73
74 ## Repository structure
75 - The root of this repository contains the three files that are common to 
76 every port - list.c, queue.c and tasks.c.  The kernel is contained within these 
77 three files.  croutine.c implements the optional co-routine functionality - which
78 is normally only used on very memory limited systems.
79
80 - The ```./portable``` directory contains the files that are specific to a particular microcontroller and/or compiler. 
81 See the readme file in the ```./portable``` directory for more information.
82
83 - The ```./include``` directory contains the real time kernel header files.
84
85 ### Code Formatting
86 FreeRTOS files are formatted using the "uncrustify" tool. The configuration file used by uncrustify can be found in the [FreeRTOS/FreeRTOS repository](https://github.com/FreeRTOS/FreeRTOS/blob/master/tools/uncrustify.cfg). 
87
88 ### Spelling
89 *lexicon.txt* contains words that are not traditionally found in an English dictionary. It is used by the spellchecker to verify the various jargon, variable names, and other odd words used in the FreeRTOS code base. If your pull request fails to pass the spelling and you believe this is a mistake, then add the word to *lexicon.txt*. 
90 Note that only the FreeRTOS Kernel source files are checked for proper spelling, the portable section is ignored.
91