FreeRTOS-Kernel/portable
Gaurav-Aggarwal-AWS 2225bb5620
Fix Stack alignment for Microchip PIC32MX port (#182)
* Fix Stack alignment for Microchip PIC32MX port

The stack of a task was not 8 byte aligned. Adding one more unused space
at the beginning of task stack (before simulated context) ensures that
the stack is 8 byte aligned. The stack (with simulated context) of a
newly created task looks like the following:

                    +------------+
                    | UNUSED     |
                    +------------+
                    | UNUSED     |
                    +------------+
                    | 0xDEADBEEF |
                    +------------+
                    | 0x12345678 |
                ^   +------------+
                |   | CAUSE      | <-- SP After Context Restore
                |   +------------+
                |   | STATUS     |
                |   +------------+
                |   | EPC        |
                |   +------------+
                |   | ra         |
                |   +------------+
                |   | s8         |
                |   +------------+
                |   | t9         |
                |   +------------+
                |   | t8         |
                |   +------------+
                |   | t7         |
                |   +------------+
                |   | t6         |
                |   +------------+
                |   | t5         |
                |   +------------+
                |   | t4         |
                |   +------------+
                |   | t3         |
                |   +------------+
                |   | t2         |
                |   +------------+
                |   | t1         |
                |   +------------+
    Context     |   | t0         |
  (132 bytes)   |   +------------+
                |   | a3         |
                |   +------------+
                |   | a2         |
                |   +------------+
                |   | a1         |
                |   +------------+
                |   | a0         |
                |   +------------+
                |   | v1         |
                |   +------------+
                |   | v0         |
                |   +------------+
                |   | s7         |
                |   +------------+
                |   | s6         |
                |   +------------+
                |   | s5         |
                |   +------------+
                |   | s4         |
                |   +------------+
                |   | s3         |
                |   +------------+
                |   | s2         |
                |   +------------+
                |   | s1         |
                |   +------------+
                |   | s0         |
                |   +------------+
                |   | at         |
                |   +------------+
                |   | HI         |
                |   +------------+
                |   | LO         |
                |   +------------+
                V   |            |
                    +------------+
                    |            | <-- SP After Context Save
                    +------------+

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>

* Update comment

Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
2020-09-28 00:16:18 -07:00
..
ARMClang Re-sync with upstream and stripping away none kernel related. 2020-02-10 13:45:57 -08:00
ARMv8M Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
BCC/16BitDOS Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
CCS Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
CodeWarrior Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
Common Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
GCC Maintenance: Add readme.txt in each Renesas RX folder to show recommended port (#152) 2020-09-28 00:09:49 -07:00
IAR Maintenance: Add readme.txt in each Renesas RX folder to show recommended port (#152) 2020-09-28 00:09:49 -07:00
Keil Re-sync with upstream and stripping away none kernel related. 2020-02-10 13:45:57 -08:00
MemMang Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
MikroC/ARM_CM4F Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
MPLAB Fix Stack alignment for Microchip PIC32MX port (#182) 2020-09-28 00:16:18 -07:00
MSVC-MingW Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
oWatcom/16BitDOS Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
Paradigm/Tern_EE Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
Renesas Maintenance: Add readme.txt in each Renesas RX folder to show recommended port (#152) 2020-09-28 00:09:49 -07:00
Rowley Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
RVDS Update History.txt and fix versioning in asm files (#177) 2020-09-18 08:05:13 -07:00
SDCC/Cygnal Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
Softune Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
Tasking/ARM_CM4F Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
ThirdParty Fix some broken/redirected URL (#172) 2020-09-21 15:49:55 -07:00
WizC/PIC18 Update version number to 10.4.1 (#173) 2020-09-17 15:25:15 -07:00
readme.txt Style: Change FreeRTOS websites in comments (#131) 2020-08-20 14:59:28 -07:00

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.