Critical sections in FreeRTOS are implemented using the following two functions: void vPortEnterCritical( void ) { portDISABLE_INTERRUPTS(); uxCriticalNesting++; } void vPortExitCritical( void ) { uxCriticalNesting--; if( uxCriticalNesting == 0 ) { portENABLE_INTERRUPTS(); } } uxCriticalNesting is initialized to a large value at the start and set to zero when the scheduler is started (xPortStartScheduler). As a result, before the scheduler is started, a pair of enter/exit critical section will leave the interrupts disabled because uxCriticalNesting will not reach zero in the vPortExitCritical function. This is done to ensure that the interrupts remain disabled from the time first FreeRTOS API is called to the time when the scheduler is started. The scheduler starting code is expected to enure that interrupts are enabled before the first task starts executing. Cortex-M33 ports were not enabling interrupts before starting the first task and as a result, the first task was started with interrupts disabled. This PR fixes the issue by ensuring that interrupts are enabled before the first task is started. Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> |
4 years ago | |
---|---|---|
.. | ||
ARMClang | 5 years ago | |
ARMv8M | 4 years ago | |
BCC/16BitDOS | 5 years ago | |
CCS | 5 years ago | |
CodeWarrior | 5 years ago | |
Common | 5 years ago | |
GCC | 4 years ago | |
IAR | 4 years ago | |
Keil | 5 years ago | |
MPLAB | 5 years ago | |
MSVC-MingW | 5 years ago | |
MemMang | 5 years ago | |
MikroC/ARM_CM4F | 5 years ago | |
Paradigm/Tern_EE | 5 years ago | |
RVDS | 5 years ago | |
Renesas | 5 years ago | |
Rowley | 5 years ago | |
SDCC/Cygnal | 5 years ago | |
Softune | 5 years ago | |
Tasking/ARM_CM4F | 5 years ago | |
ThirdParty | 4 years ago | |
WizC/PIC18 | 5 years ago | |
oWatcom/16BitDOS | 5 years ago | |
readme.txt | 5 years ago |
readme.txt
Each real time kernel port consists of three files that contain the core kernel components and are common to every port, and one or more files that are specific to a particular microcontroller and/or compiler. + The FreeRTOS/Source/Portable/MemMang directory contains the five sample memory allocators as described on the https://www.FreeRTOS.org WEB site. + The other directories each contain files specific to a particular microcontroller or compiler, where the directory name denotes the compiler specific files the directory contains. For example, if you are interested in the [compiler] port for the [architecture] microcontroller, then the port specific files are contained in FreeRTOS/Source/Portable/[compiler]/[architecture] directory. If this is the only port you are interested in then all the other directories can be ignored.