ChibiOS
0.0.0
|
![]() |
Kernel related settings and hooks.
System timers settings | |
#define | CH_CFG_ST_RESOLUTION 32 |
System time counter resolution. More... | |
#define | CH_CFG_ST_FREQUENCY 10000 |
System tick frequency. More... | |
#define | CH_CFG_INTERVALS_SIZE 32 |
Time intervals data size. More... | |
#define | CH_CFG_TIME_TYPES_SIZE 32 |
Time types data size. More... | |
#define | CH_CFG_ST_TIMEDELTA 2 |
Time delta constant for the tick-less mode. More... | |
Kernel parameters and options | |
#define | CH_CFG_TIME_QUANTUM 0 |
Round robin interval. More... | |
#define | CH_CFG_MEMCORE_SIZE 0 |
Managed RAM size. More... | |
#define | CH_CFG_NO_IDLE_THREAD FALSE |
Idle thread automatic spawn suppression. More... | |
Performance options | |
#define | CH_CFG_OPTIMIZE_SPEED TRUE |
OS optimization. More... | |
Subsystem options | |
#define | CH_CFG_USE_TM TRUE |
Time Measurement APIs. More... | |
#define | CH_CFG_USE_REGISTRY TRUE |
Threads registry APIs. More... | |
#define | CH_CFG_USE_WAITEXIT TRUE |
Threads synchronization APIs. More... | |
#define | CH_CFG_USE_SEMAPHORES TRUE |
Semaphores APIs. More... | |
#define | CH_CFG_USE_SEMAPHORES_PRIORITY FALSE |
Semaphores queuing mode. More... | |
#define | CH_CFG_USE_MUTEXES TRUE |
Mutexes APIs. More... | |
#define | CH_CFG_USE_MUTEXES_RECURSIVE FALSE |
Enables recursive behavior on mutexes. More... | |
#define | CH_CFG_USE_CONDVARS TRUE |
Conditional Variables APIs. More... | |
#define | CH_CFG_USE_CONDVARS_TIMEOUT TRUE |
Conditional Variables APIs with timeout. More... | |
#define | CH_CFG_USE_EVENTS TRUE |
Events Flags APIs. More... | |
#define | CH_CFG_USE_EVENTS_TIMEOUT TRUE |
Events Flags APIs with timeout. More... | |
#define | CH_CFG_USE_MESSAGES TRUE |
Synchronous Messages APIs. More... | |
#define | CH_CFG_USE_MESSAGES_PRIORITY FALSE |
Synchronous Messages queuing mode. More... | |
#define | CH_CFG_USE_MAILBOXES TRUE |
Mailboxes APIs. More... | |
#define | CH_CFG_USE_MEMCORE TRUE |
Core Memory Manager APIs. More... | |
#define | CH_CFG_USE_HEAP TRUE |
Heap Allocator APIs. More... | |
#define | CH_CFG_USE_MEMPOOLS TRUE |
Memory Pools Allocator APIs. More... | |
#define | CH_CFG_USE_OBJ_FIFOS TRUE |
Objects FIFOs APIs. More... | |
#define | CH_CFG_USE_DYNAMIC TRUE |
Dynamic Threads APIs. More... | |
Objects factory options | |
#define | CH_CFG_USE_FACTORY TRUE |
Objects Factory APIs. More... | |
#define | CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 |
Maximum length for object names. More... | |
#define | CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE |
Enables the registry of generic objects. More... | |
#define | CH_CFG_FACTORY_GENERIC_BUFFERS TRUE |
Enables factory for generic buffers. More... | |
#define | CH_CFG_FACTORY_SEMAPHORES TRUE |
Enables factory for semaphores. More... | |
#define | CH_CFG_FACTORY_MAILBOXES TRUE |
Enables factory for mailboxes. More... | |
#define | CH_CFG_FACTORY_OBJ_FIFOS TRUE |
Enables factory for objects FIFOs. More... | |
Debug options | |
#define | CH_DBG_STATISTICS FALSE |
Debug option, kernel statistics. More... | |
#define | CH_DBG_SYSTEM_STATE_CHECK TRUE |
Debug option, system state check. More... | |
#define | CH_DBG_ENABLE_CHECKS TRUE |
Debug option, parameters checks. More... | |
#define | CH_DBG_ENABLE_ASSERTS TRUE |
Debug option, consistency checks. More... | |
#define | CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_ALL |
Debug option, trace buffer. More... | |
#define | CH_DBG_TRACE_BUFFER_SIZE 128 |
Trace buffer entries. More... | |
#define | CH_DBG_ENABLE_STACK_CHECK TRUE |
Debug option, stack checks. More... | |
#define | CH_DBG_FILL_THREADS TRUE |
Debug option, stacks initialization. More... | |
#define | CH_DBG_THREADS_PROFILING FALSE |
Debug option, threads profiling. More... | |
Kernel hooks | |
#define | CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/ |
System structure extension. More... | |
#define | CH_CFG_SYSTEM_INIT_HOOK(tp) |
System initialization hook. More... | |
#define | CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/ |
Threads descriptor structure extension. More... | |
#define | CH_CFG_THREAD_INIT_HOOK(tp) |
Threads initialization hook. More... | |
#define | CH_CFG_THREAD_EXIT_HOOK(tp) |
Threads finalization hook. More... | |
#define | CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) |
Context switch hook. More... | |
#define | CH_CFG_IRQ_PROLOGUE_HOOK() |
ISR enter hook. More... | |
#define | CH_CFG_IRQ_EPILOGUE_HOOK() |
ISR exit hook. More... | |
#define | CH_CFG_IDLE_ENTER_HOOK() |
Idle thread enter hook. More... | |
#define | CH_CFG_IDLE_LEAVE_HOOK() |
Idle thread leave hook. More... | |
#define | CH_CFG_IDLE_LOOP_HOOK() |
Idle Loop hook. More... | |
#define | CH_CFG_SYSTEM_TICK_HOOK() |
System tick event hook. More... | |
#define | CH_CFG_SYSTEM_HALT_HOOK(reason) |
System halt hook. More... | |
#define | CH_CFG_TRACE_HOOK(tep) |
Trace hook. More... | |
#define CH_CFG_ST_RESOLUTION 32 |
System time counter resolution.
Definition at line 45 of file rt/templates/chconf.h.
#define CH_CFG_ST_FREQUENCY 10000 |
System tick frequency.
Frequency of the system timer that drives the system ticks. This setting also defines the system tick time unit.
Definition at line 52 of file rt/templates/chconf.h.
Referenced by chTimeI2MS(), chTimeI2S(), chTimeI2US(), chTimeMS2I(), chTimeS2I(), and chTimeUS2I().
#define CH_CFG_INTERVALS_SIZE 32 |
Time intervals data size.
Definition at line 58 of file rt/templates/chconf.h.
#define CH_CFG_TIME_TYPES_SIZE 32 |
Time types data size.
Definition at line 64 of file rt/templates/chconf.h.
#define CH_CFG_ST_TIMEDELTA 2 |
Time delta constant for the tick-less mode.
Definition at line 74 of file rt/templates/chconf.h.
#define CH_CFG_TIME_QUANTUM 0 |
Round robin interval.
This constant is the number of system ticks allowed for the threads before preemption occurs. Setting this value to zero disables the preemption for threads with equal priority and the round robin becomes cooperative. Note that higher priority threads can still preempt, the kernel is always preemptive.
Definition at line 97 of file rt/templates/chconf.h.
Referenced by _thread_init(), chSchDoReschedule(), chSchDoRescheduleBehind(), and chSchGoSleepS().
#define CH_CFG_MEMCORE_SIZE 0 |
Managed RAM size.
Size of the RAM area to be managed by the OS. If set to zero then the whole available RAM is used. The core memory is made available to the heap allocator and/or can be used directly through the simplified core memory allocator.
heap_base
and heap_end
symbols. CH_CFG_USE_MEMCORE
. Definition at line 110 of file rt/templates/chconf.h.
Referenced by _core_init().
#define CH_CFG_NO_IDLE_THREAD FALSE |
Idle thread automatic spawn suppression.
When this option is activated the function chSysInit()
does not spawn the idle thread. The application main()
function becomes the idle thread and must implement an infinite loop.
Definition at line 119 of file rt/templates/chconf.h.
#define CH_CFG_OPTIMIZE_SPEED TRUE |
OS optimization.
If enabled then time efficient rather than space efficient code is used when two possible implementations exist.
TRUE
. Definition at line 138 of file rt/templates/chconf.h.
#define CH_CFG_USE_TM TRUE |
Time Measurement APIs.
If enabled then the time measurement APIs are included in the kernel.
TRUE
. Definition at line 156 of file rt/templates/chconf.h.
#define CH_CFG_USE_REGISTRY TRUE |
Threads registry APIs.
If enabled then the registry APIs are included in the kernel.
TRUE
. Definition at line 164 of file rt/templates/chconf.h.
#define CH_CFG_USE_WAITEXIT TRUE |
Threads synchronization APIs.
If enabled then the chThdWait()
function is included in the kernel.
TRUE
. Definition at line 173 of file rt/templates/chconf.h.
#define CH_CFG_USE_SEMAPHORES TRUE |
Semaphores APIs.
If enabled then the Semaphores APIs are included in the kernel.
TRUE
. Definition at line 181 of file rt/templates/chconf.h.
#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE |
Semaphores queuing mode.
If enabled then the threads are enqueued on semaphores by priority rather than in FIFO order.
FALSE
. Enable this if you have special requirements. CH_CFG_USE_SEMAPHORES
. Definition at line 192 of file rt/templates/chconf.h.
#define CH_CFG_USE_MUTEXES TRUE |
Mutexes APIs.
If enabled then the mutexes APIs are included in the kernel.
TRUE
. Definition at line 200 of file rt/templates/chconf.h.
#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE |
Enables recursive behavior on mutexes.
FALSE
. CH_CFG_USE_MUTEXES
. Definition at line 210 of file rt/templates/chconf.h.
#define CH_CFG_USE_CONDVARS TRUE |
Conditional Variables APIs.
If enabled then the conditional variables APIs are included in the kernel.
TRUE
. CH_CFG_USE_MUTEXES
. Definition at line 220 of file rt/templates/chconf.h.
#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE |
Conditional Variables APIs with timeout.
If enabled then the conditional variables APIs with timeout specification are included in the kernel.
TRUE
. CH_CFG_USE_CONDVARS
. Definition at line 230 of file rt/templates/chconf.h.
#define CH_CFG_USE_EVENTS TRUE |
Events Flags APIs.
If enabled then the event flags APIs are included in the kernel.
TRUE
. Definition at line 238 of file rt/templates/chconf.h.
#define CH_CFG_USE_EVENTS_TIMEOUT TRUE |
Events Flags APIs with timeout.
If enabled then the events APIs with timeout specification are included in the kernel.
TRUE
. CH_CFG_USE_EVENTS
. Definition at line 248 of file rt/templates/chconf.h.
#define CH_CFG_USE_MESSAGES TRUE |
Synchronous Messages APIs.
If enabled then the synchronous messages APIs are included in the kernel.
TRUE
. Definition at line 257 of file rt/templates/chconf.h.
#define CH_CFG_USE_MESSAGES_PRIORITY FALSE |
Synchronous Messages queuing mode.
If enabled then messages are served by priority rather than in FIFO order.
FALSE
. Enable this if you have special requirements. CH_CFG_USE_MESSAGES
. Definition at line 268 of file rt/templates/chconf.h.
#define CH_CFG_USE_MAILBOXES TRUE |
Mailboxes APIs.
If enabled then the asynchronous messages (mailboxes) APIs are included in the kernel.
TRUE
. CH_CFG_USE_SEMAPHORES
. Definition at line 278 of file rt/templates/chconf.h.
#define CH_CFG_USE_MEMCORE TRUE |
Core Memory Manager APIs.
If enabled then the core memory manager APIs are included in the kernel.
TRUE
. Definition at line 287 of file rt/templates/chconf.h.
#define CH_CFG_USE_HEAP TRUE |
Heap Allocator APIs.
If enabled then the memory heap allocator APIs are included in the kernel.
TRUE
. CH_CFG_USE_MEMCORE
and either CH_CFG_USE_MUTEXES
or CH_CFG_USE_SEMAPHORES
. Definition at line 299 of file rt/templates/chconf.h.
#define CH_CFG_USE_MEMPOOLS TRUE |
Memory Pools Allocator APIs.
If enabled then the memory pools allocator APIs are included in the kernel.
TRUE
. Definition at line 308 of file rt/templates/chconf.h.
#define CH_CFG_USE_OBJ_FIFOS TRUE |
Objects FIFOs APIs.
If enabled then the objects FIFOs APIs are included in the kernel.
TRUE
. Definition at line 317 of file rt/templates/chconf.h.
#define CH_CFG_USE_DYNAMIC TRUE |
Dynamic Threads APIs.
If enabled then the dynamic threads creation APIs are included in the kernel.
TRUE
. CH_CFG_USE_WAITEXIT
. CH_CFG_USE_HEAP
and/or CH_CFG_USE_MEMPOOLS
. Definition at line 328 of file rt/templates/chconf.h.
#define CH_CFG_USE_FACTORY TRUE |
Objects Factory APIs.
If enabled then the objects factory APIs are included in the kernel.
FALSE
. Definition at line 346 of file rt/templates/chconf.h.
#define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8 |
Maximum length for object names.
If the specified length is zero then the name is stored by pointer but this could have unintended side effects.
Definition at line 353 of file rt/templates/chconf.h.
#define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE |
Enables the registry of generic objects.
Definition at line 358 of file rt/templates/chconf.h.
#define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE |
Enables factory for generic buffers.
Definition at line 363 of file rt/templates/chconf.h.
#define CH_CFG_FACTORY_SEMAPHORES TRUE |
Enables factory for semaphores.
Definition at line 368 of file rt/templates/chconf.h.
#define CH_CFG_FACTORY_MAILBOXES TRUE |
Enables factory for mailboxes.
Definition at line 373 of file rt/templates/chconf.h.
#define CH_CFG_FACTORY_OBJ_FIFOS TRUE |
Enables factory for objects FIFOs.
Definition at line 378 of file rt/templates/chconf.h.
#define CH_DBG_STATISTICS FALSE |
Debug option, kernel statistics.
FALSE
. Definition at line 394 of file rt/templates/chconf.h.
#define CH_DBG_SYSTEM_STATE_CHECK TRUE |
Debug option, system state check.
If enabled the correct call protocol for system APIs is checked at runtime.
FALSE
. Definition at line 403 of file rt/templates/chconf.h.
#define CH_DBG_ENABLE_CHECKS TRUE |
Debug option, parameters checks.
If enabled then the checks on the API functions input parameters are activated.
FALSE
. Definition at line 412 of file rt/templates/chconf.h.
#define CH_DBG_ENABLE_ASSERTS TRUE |
Debug option, consistency checks.
If enabled then all the assertions in the kernel code are activated. This includes consistency checks inside the kernel, runtime anomalies and port-defined checks.
FALSE
. Definition at line 422 of file rt/templates/chconf.h.
#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_ALL |
Debug option, trace buffer.
If enabled then the trace buffer is activated.
CH_DBG_TRACE_MASK_DISABLED
. Definition at line 430 of file rt/templates/chconf.h.
#define CH_DBG_TRACE_BUFFER_SIZE 128 |
Trace buffer entries.
CH_DBG_TRACE_MASK
is different from CH_DBG_TRACE_MASK_DISABLED
. Definition at line 437 of file rt/templates/chconf.h.
#define CH_DBG_ENABLE_STACK_CHECK TRUE |
Debug option, stack checks.
If enabled then a runtime stack check is performed.
FALSE
. panic_msg
variable set to NULL
. Definition at line 449 of file rt/templates/chconf.h.
#define CH_DBG_FILL_THREADS TRUE |
Debug option, stacks initialization.
If enabled then the threads working area is filled with a byte value when a thread is created. This can be useful for the runtime measurement of the used stack.
FALSE
. Definition at line 459 of file rt/templates/chconf.h.
#define CH_DBG_THREADS_PROFILING FALSE |
Debug option, threads profiling.
If enabled then a field is added to the thread_t
structure that counts the system ticks occurred while executing the thread.
FALSE
. Definition at line 470 of file rt/templates/chconf.h.
#define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/ |
System structure extension.
User fields added to the end of the ch_system_t
structure.
Definition at line 485 of file rt/templates/chconf.h.
#define CH_CFG_SYSTEM_INIT_HOOK | ( | tp | ) |
System initialization hook.
User initialization code added to the chSysInit()
function just before interrupts are enabled globally.
Definition at line 493 of file rt/templates/chconf.h.
Referenced by chSysInit().
#define CH_CFG_THREAD_EXTRA_FIELDS /* Add threads custom fields here.*/ |
Threads descriptor structure extension.
User fields added to the end of the thread_t
structure.
Definition at line 501 of file rt/templates/chconf.h.
#define CH_CFG_THREAD_INIT_HOOK | ( | tp | ) |
Threads initialization hook.
User initialization code added to the _thread_init()
function.
_thread_init()
and implicitly from all the threads creation APIs. Definition at line 511 of file rt/templates/chconf.h.
Referenced by _thread_init().
#define CH_CFG_THREAD_EXIT_HOOK | ( | tp | ) |
Threads finalization hook.
User finalization code added to the chThdExit()
API.
Definition at line 519 of file rt/templates/chconf.h.
Referenced by chThdExitS().
#define CH_CFG_CONTEXT_SWITCH_HOOK | ( | ntp, | |
otp | |||
) |
Context switch hook.
This hook is invoked just before switching between threads.
Definition at line 527 of file rt/templates/chconf.h.
#define CH_CFG_IRQ_PROLOGUE_HOOK | ( | ) |
ISR enter hook.
Definition at line 534 of file rt/templates/chconf.h.
#define CH_CFG_IRQ_EPILOGUE_HOOK | ( | ) |
ISR exit hook.
Definition at line 541 of file rt/templates/chconf.h.
#define CH_CFG_IDLE_ENTER_HOOK | ( | ) |
Idle thread enter hook.
Definition at line 551 of file rt/templates/chconf.h.
Referenced by chSchGoSleepS(), and chSchGoSleepTimeoutS().
#define CH_CFG_IDLE_LEAVE_HOOK | ( | ) |
Idle thread leave hook.
Definition at line 561 of file rt/templates/chconf.h.
Referenced by chSchDoReschedule(), chSchDoRescheduleAhead(), chSchDoRescheduleBehind(), and chSchWakeupS().
#define CH_CFG_IDLE_LOOP_HOOK | ( | ) |
Idle Loop hook.
This hook is continuously invoked by the idle thread loop.
Definition at line 569 of file rt/templates/chconf.h.
Referenced by _idle_thread().
#define CH_CFG_SYSTEM_TICK_HOOK | ( | ) |
System tick event hook.
This hook is invoked in the system tick handler immediately after processing the virtual timers queue.
Definition at line 578 of file rt/templates/chconf.h.
Referenced by chSysTimerHandlerI().
#define CH_CFG_SYSTEM_HALT_HOOK | ( | reason | ) |
System halt hook.
This hook is invoked in case to a system halting error before the system is halted.
Definition at line 587 of file rt/templates/chconf.h.
Referenced by chSysHalt().
#define CH_CFG_TRACE_HOOK | ( | tep | ) |
Trace hook.
This hook is invoked each time a new record is written in the trace buffer.
Definition at line 596 of file rt/templates/chconf.h.
Referenced by trace_next().