A ChibiOS/RT extension exclusive to Cortex-M3, M4 and M7 cores. ChibiOS/SB is able to create isolated partitions in the application code called sandboxes:
A sandbox is a full C/C++ application with its own startup file, main() function and its own copy of C runtime library. The API module provides means of communication between the sandbox application and the privileged application (acting as a standalone OS), in addition, a basic Posix-like API is provided to the sandbox application for console I/O. The privileged application can define its own extensions to the sandbox API.
You may consider sandboxes as “processes” in a standalone classic OS.
SVC
instruction. A basic API is included in the SB module.Sandboxes are ideally suited for running code downloaded from outside safely or to isolate non-critical parts of the application.
There are two kinds of sandboxes: static or dynamic.
Static Sandboxes are statically allocated within MPU regions, their number is limited by the number of available regions. Regions are not swapped during context switching.
The main advantages are:
Disadvantages:
Dynamic Sandboxes all use the same MPU regions that are swapped during context switch, there is no limit in their number but the context switch operation is slower because the extra context data.
The main advantages are:
Disadvantages:
Sandboxes can have two possible memory setups.