1. What is more suitable for running RTOS: Cortex-A or Cortex-R or Cortex-M?
2. I want to make my own RTOS on Cortex-M: How to use MPU for protecting tasks?
Many RTOS do not protect memory at all.
WestfW said:Many RTOS do not protect memory at all.
Then you should not use it.
OK, now I'm curious. Your Sciopta RTOS lists the use of memory protection as a feature and supports Cortex-M, but the documentation that is online keeps referring to the MMU (which isn't present on Cortex-M; just the MPU. Usually 8 regions.) What sort of memory protection does it provide on a system with only a 8region MPU, and what sort of limitations does it place on the services provided (presumably a shared heap space with per-task protected memory isn't possible, for example)? I guess you can protect each task's stack and a private data segment - is that enough to be meaningful?
With respect to memory protection the term MMU =~ MPU.
The "task" concept in SCIOPTA is more like the thread concept in *nix/Windows/MacOS: We have modules and processes. Memory protection (by MPU or MMU) is done between modules. Process within one module share the same memory area and are not protected against each other. So like process/thread in Linux.
SCIOPTA has no shared memory at all. It uses direct message passing. If messages are sent between protection regimes, then the message contents will be copied by the kernel.
As for the number of regions: The kernel changes MPU setup on task switch if needed.
The pity about the MPU (and MMU is even worse) is the granularity, that's why I decided to leave active stack check out.
Though we might use a data watch point if wanted (and available) to protect against stack overflow.