You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
82df39764a
* Xtensa: fix the coproc_area incorrect issue foss-xtensa/amazon-freertos#2 mentioned a issue: 1. In function pxPortInitialiseStack(StackType_t *pxTopOfStack....) p = (uint32_t *)(((uint32_t) pxTopOfStack - XT_CP_SIZE) & ~0xf); In function prvInitialiseNewTask (file: task.c) pxTopOfStack = (pxStack + (ulStackDepth - 1)) & (~portBYTE_ALIGNMENT_MASK) So the co-processor area is at p = (uint32_t *)(((uint32_t)((pxStack + (ulStackDepth - 1)) & (~portBYTE_ALIGNMENT_MASK)) - XT_CP_SIZE) & ~0xf); 2. In function vPortStoreTaskMPUSettings( .... , StackType_t pxBottomOfStack ...) xMPUSettings->coproc_area = (StackType_t)((((uint32_t)(pxBottomOfStack + usStackDepth - 1)) - XT_CP_SIZE) & ~0xf); pxBottomOfStack = pxStack => xMPUSettings->coproc_area = (StackType_t*)((((uint32_t)(pxStack+ ulStackDepth - 1)) - XT_CP_SIZE ) & ~0xf); The p is coproc_area that should be equal to xMPUSettings->coproc_area. For example, assume pxStack is 0xa0000000, ulStackDepth is 0x2000, portBYTE_ALIGNMENT_MASK is 0x7f, XT_CP_SIZE is 0x100. The p = (uint32_t)(((uint32_t)((pxStack + (ulStackDepth - 1)) & (~portBYTE_ALIGNMENT_MASK)) - XT_CP_SIZE) & ~0xf) = 0xa0001e80 The xMPUSettings->coproc_area = (StackType_t)((((uint32_t)(pxStack+ usStackDepth - 1)) - XT_CP_SIZE ) & ~0xf) = 0xa0001ef0 Obviously, the p is not equal to the xMPUSettings->coproc_area, which will cause context switching error. Signed-off-by: magicse7en <magicse7en@outlook.com> * Update port.c Co-authored-by: Carl Lundin <53273776+lundinc2@users.noreply.github.com> |
4 years ago | |
---|---|---|
.. | ||
ARMClang | 5 years ago | |
ARMv8M | 4 years ago | |
BCC/16BitDOS | 4 years ago | |
CCS | 4 years ago | |
CodeWarrior | 4 years ago | |
Common | 4 years ago | |
GCC | 4 years ago | |
IAR | 4 years ago | |
Keil | 5 years ago | |
MPLAB | 4 years ago | |
MSVC-MingW | 4 years ago | |
MemMang | 4 years ago | |
MikroC/ARM_CM4F | 4 years ago | |
Paradigm/Tern_EE | 4 years ago | |
RVDS | 4 years ago | |
Renesas | 4 years ago | |
Rowley | 4 years ago | |
SDCC/Cygnal | 4 years ago | |
Softune | 4 years ago | |
Tasking/ARM_CM4F | 4 years ago | |
ThirdParty | 4 years ago | |
WizC/PIC18 | 4 years ago | |
oWatcom/16BitDOS | 4 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.