Definitions used to configure the RTOS. More...
#define | OS_INTEGER_SYSTICK_FREQUENCY_HZ (1000) |
Define the scheduler frequency, in Hz. | |
#define | OS_INTEGER_RTOS_CRITICAL_SECTION_INTERRUPT_PRIORITY |
For Cortex-M[347], define the interrupt priority level. | |
#define | OS_INTEGER_RTOS_DEFAULT_STACK_SIZE_BYTES |
Define the default thread stack size, in bytes. | |
#define | OS_INTEGER_RTOS_MAIN_STACK_SIZE_BYTES |
Define the main thread stack size, in bytes. | |
#define | OS_INTEGER_RTOS_IDLE_STACK_SIZE_BYTES |
Define the idle thread stack size. | |
#define | OS_INCLUDE_RTOS_STATISTICS_THREAD_CPU_CYCLES (1) |
Include statistics to count thread CPU cycles. | |
#define | OS_INCLUDE_RTOS_STATISTICS_THREAD_CONTEXT_SWITCHES |
Include statistics to count thread context switches. | |
#define | OS_INCLUDE_RTOS_CUSTOM_THREAD_USER_STORAGE |
Add a user defined storage to each thread. | |
#define | OS_BOOL_RTOS_MESSAGE_QUEUE_SIZE_16BITS (false) |
Extend the message size to 16 bits. | |
#define | OS_BOOL_RTOS_THREAD_IDLE_PRIORITY_BELOW_IDLE (false) |
Push down the idle thread priority. | |
#define | OS_BOOL_RTOS_PORT_CONTEXT_CREATE_ZERO_LR (false) |
Force the stack trace to start with a 0x0. | |
#define | OS_BOOL_RTOS_SCHEDULER_PREEMPTIVE (true) |
Default definition for the preemption flag. | |
#define | OS_EXCLUDE_RTOS_IDLE_SLEEP |
Do not enter sleep in the idle thread. | |
Definitions used to configure the RTOS.
#define OS_BOOL_RTOS_MESSAGE_QUEUE_SIZE_16BITS (false) |
Extend the message size to 16 bits.
For embedded applications the message queues are optimised for small messages, up to 256 bytes.
If larger messages are needed, this option extends the message size to 65536 bytes.
Definition at line 418 of file os-app-config.h.
#define OS_BOOL_RTOS_PORT_CONTEXT_CREATE_ZERO_LR (false) |
Force the stack trace to start with a 0x0.
This option has no functional consequences, it is only cosmetic, affecting how a debugger displays the stack trace.
If your debugger has difficulties to properly display the thread stack trace, enable this option and the stack will always start with a 0x0.
Definition at line 451 of file os-app-config.h.
#define OS_BOOL_RTOS_SCHEDULER_PREEMPTIVE (true) |
Default definition for the preemption flag.
This option sets the initial value of the scheduler::preemptive()
flag. It can be changed at any time.
Definition at line 464 of file os-app-config.h.
#define OS_BOOL_RTOS_THREAD_IDLE_PRIORITY_BELOW_IDLE (false) |
Push down the idle thread priority.
Normally the applications should not create threads with the idle priority.
However, some applications, like the ARM CMSIS RTOS validator, need to test the behaviour of idle threads. For such cases, to guarantee that the idle thread is the lowest priority thread, its priority can be lowered one additional step.
Definition at line 435 of file os-app-config.h.
#define OS_EXCLUDE_RTOS_IDLE_SLEEP |
Do not enter sleep in the idle thread.
Very fast debuggers need direct access to a RAM buffer, which in turn need the clock that powers the bus where the RAM is connected to be permanently on.
Unfortunately, most devices disable this clock when entering even the shallow sleep mode, disabling the debugger access to the device.
To prevent this, usually for the debug configurations, it is possible to exclude the code that puts the device to sleep.
Definition at line 481 of file os-app-config.h.
#define OS_INCLUDE_RTOS_CUSTOM_THREAD_USER_STORAGE |
Add a user defined storage to each thread.
Definition at line 403 of file os-app-config.h.
#define OS_INCLUDE_RTOS_STATISTICS_THREAD_CONTEXT_SWITCHES |
Include statistics to count thread context switches.
Add support to count the number of times each thread was scheduled to run.
At each context switch, the thread counter is incremented. At the same time a global counter is also incremented.
The RAM overhead of enabling this option is a uint64_t variable for each thread and one global variable.
The time overhead is low, incrementing two 64-bit variables.
Definition at line 398 of file os-app-config.h.
#define OS_INCLUDE_RTOS_STATISTICS_THREAD_CPU_CYCLES (1) |
Include statistics to count thread CPU cycles.
Add support to measure and accumulate accurate thread duration statistics.
At each context switch, the high resolution clock is sampled and the difference is added to the current thread statistics variables. At the same time the value is added to a global variable.
The RAM overhead of enabling this option is a uint64_t variable for each thread and one global variable.
The time overhead is a clock sampling (reading timer registers and possibly adjusting for timer recycle) plus some subtractions/additions on 64-bits.
Definition at line 376 of file os-app-config.h.
#define OS_INTEGER_RTOS_CRITICAL_SECTION_INTERRUPT_PRIORITY |
For Cortex-M[347], define the interrupt priority level.
Simple devices implement critical sections by disabling/enabling all interrupts. Cortex-M[347] devices can selectively disable interrupts up to a given priority (by using the BASEPRI register).
When used, this option configures the critical sections to disable all interrupts with priorities up to the given value and keep enabled interrupts with higher priorities.
If the application does not use high priority interrupts, it is recommend to do not use this option, and allow the system to implement the critical sections by completely disabling/enabling interrupts.
If used, the recommended value is 3-4.
Definition at line 332 of file os-app-config.h.
#define OS_INTEGER_RTOS_DEFAULT_STACK_SIZE_BYTES |
Define the default thread stack size, in bytes.
Definition at line 337 of file os-app-config.h.
#define OS_INTEGER_RTOS_IDLE_STACK_SIZE_BYTES |
Define the idle thread stack size.
Definition at line 351 of file os-app-config.h.
#define OS_INTEGER_RTOS_MAIN_STACK_SIZE_BYTES |
Define the main thread stack size, in bytes.
Definition at line 344 of file os-app-config.h.
#define OS_INTEGER_SYSTICK_FREQUENCY_HZ (1000) |