CMSIS-RTOS RTX
Version 4.51
CMSIS-RTOS RTX: Real-Time Operating System for Cortex-M processor-based devices
|
The CMSIS-RTOS RTX provides several parameters for the thread configuration.
The osThreadDef defines a thread function. The parameter stacksz specifies thereby the stack requirements of this thread function. CMSIS-RTOS RTX defines two methods for defining the stack requirements:
The following #defines specify the stack for thread execution:
CMSIS-RTOS RTX implements a software stack overflow checking that traps stack overruns. Stack is used for return addresses and automatic variables and extensive usage or incorrect stack configuration may cause a stack overflow. Software stack overflow checking is controlled with the #define OS_STKCHECK.
If a stack overflow is detected, the function os_error with error code = 1 is called. By default, this function is implemented as endless loop and will practically stop code execution.
CMSIS-RTOS RTX allows to execute threads in unprivileged or privileged processor mode. The processor mode is controlled with the #define OS_RUNPRIV.
In unprivileged processor mode, the software:
In privileged processor mode the software can use all the instructions and has access to all resources.