FreeRTOS-Kernel/portable
Ahmed Ismail 6cd736cfeb
Arm-Cortex-R82: Add MPU support (#1347)
* arm-cortex-r82: Add MPU support

This commit introduces support for the Memory Protection Unit (MPU)
to the ARM Cortex-R82 port. The MPU enhances system security
by allowing the definition of memory regions with specific access
permissions. The following changes have been made:
- Added MPU configuration functions in `port.c` to set up memory
  regions and their attributes.
- Updated `portASM.S` to include assembly routines for MPU
  and context switching with MPU support.
- Created `mpu_wrappers_v2_asm.c` to provide assembly wrappers for
  MPU operations.
- Updated `portmacro.h` to include MPU-related macros and definitions.
- Modified `task.h` to include MPU-related task attributes.
- Updated `CMakeLists.txt` to include the new MPU source file.
- Enhanced the `README.md` with instructions on MPU configuration.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>

* cortex-r82: Minor code improvements

This commit includes minor code improvements to enhance readability
and maintainability of the Cortex-R82 port files. Changes include
refactoring variable names, optimizing comments, and improving code
structure without altering functionality.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>

* tasks: Disable stack-depth check if MPU wrappers is set

This stack-depth check should not be performed for ports
where portUSING_MPU_WRAPPERS is set to 1.
In this case, pxTopOfStack and pxNewTCB->pxTopOfStack reside
in different memory regions: pxTopOfStack is in unprivileged SRAM,
while pxNewTCB->pxTopOfStack is in privileged SRAM.
This is because pxPortInitialiseStack() returns the address of
`ullContext` array rather than the decremented pxTopOfStack,
as is done in the non-MPU case.
Consequently, this check is not valid in this scenario.

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>

---------

Signed-off-by: Ahmed Ismail <Ahmed.Ismail@arm.com>
2026-02-11 10:18:55 +05:30
..
ARMClang
ARMv8M Add ARM Cortex-M52 port support FreeRTOS#1305 (#1334) 2025-12-19 17:52:58 +05:30
BCC/16BitDOS
CCRH/F1Kx Pass core ID to port lock macros (#1212) 2024-12-30 14:28:49 +05:30
CCS Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
CodeWarrior
Common event-groups: Fix multiple definitions (#1307) 2025-08-14 10:40:59 -07:00
GCC Arm-Cortex-R82: Add MPU support (#1347) 2026-02-11 10:18:55 +05:30
IAR Add CFI frame unwind info in portable/IAR/RXv2/port_asm.s (#1341) 2026-01-12 17:53:32 +05:30
Keil
MemMang Change the macro from portMAX_DELAY to SIZE_MAX in order to initialize size_t-type variable correctly (#1310) 2025-08-15 12:37:23 +05:30
MikroC/ARM_CM4F Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
MPLAB MPLAB PIC32MZ-EF - Adds an assert to catch register overflow (#1265) (#1267) 2025-04-25 17:05:15 +05:30
MSVC-MingW Win32: Guard timeapi.h include for MinGW compatibility (#1345) 2025-12-23 12:01:31 -08:00
oWatcom/16BitDOS Fix spelling typos (#1168) 2024-11-01 10:09:49 -07:00
Paradigm/Tern_EE
Renesas Move configASSERT default definition above before including portable.h. (#1185) 2024-11-04 16:35:52 +05:30
Rowley
RVDS cortex-M ports: Clarify hardware-saved exception frame size variable (#1314) 2025-09-09 14:25:42 +08:00
SDCC/Cygnal
Softune
Tasking/ARM_CM4F
template Pass core ID to port lock macros (#1212) 2024-12-30 14:28:49 +05:30
ThirdParty Add missing include to fix compile error (#1358) 2026-01-18 18:38:16 +00:00
WizC/PIC18 Fix spelling typos (#1168) 2024-11-01 10:09:49 -07:00
CMakeLists.txt Arm-Cortex-R82: Add MPU support (#1347) 2026-02-11 10:18:55 +05:30
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.