Argon RTOS  1.3.0
Tiny embedded real-time kernel
Configuration
+ Collaboration diagram for Configuration:

Description

Documentation of the configuration macros.

These configuration macros are used to control features of Argon. There are several ways to modify the configuration. The recommended method is to copy the ar_config.h file to your application's source code tree and modify it. Be sure to place the new config file's directory earlier in the include paths than the Argon source directory.

Another option for adjusting configuration settings is to specify the configuration macro values directly on the compiler's command line, in order to override the default values of these macros.

Some configuration macros have defaults based on the debug or release build type. For these, the value of the DEBUG macro is used to determine the build type.

Macros

#define AR_ANONYMOUS_OBJECT_NAME
 The string to use for the name of an object that wasn't provided a name.
 
#define AR_DEFERRED_ACTION_QUEUE_SIZE
 Maximum number of actions deferred from IRQ context.
 
#define AR_ENABLE_LIST_CHECKS
 Enable runtime checking of linked lists. More...
 
#define AR_ENABLE_TICKLESS_IDLE
 Set to 1 to enable tickless idle.
 
#define AR_ENABLE_TRACE
 Enable kernel event tracing.
 
#define AR_GLOBAL_OBJECT_LISTS
 Set to 1 to enable the lists of all created kernel objects. More...
 
#define AR_RUNLOOP_FUNCTION_QUEUE_SIZE
 Maximum number of functions queued in a run loop.
 
#define AR_THREAD_STACK_PATTERN_FILL
 Whether to fill a new thread's stack with a pattern. More...
 

Idle thread config

#define AR_ENABLE_IDLE_SLEEP
 Controls whether the idle thread puts the processor to sleep until the next interrupt. More...
 
#define AR_IDLE_THREAD_STACK_SIZE
 Size in bytes of the idle thread's stack.
 

System load config

#define AR_ENABLE_SYSTEM_LOAD
 When set to 1, per-thread and total system CPU load will be computed.
 
#define AR_SYSTEM_LOAD_SAMPLE_PERIOD
 Microsecond period over which CPU load is computed. More...
 

Main thread config

#define AR_ENABLE_MAIN_THREAD
 Set to 1 to cause main() to be run in a thread. More...
 
#define AR_SCHEDULER_STACK_SIZE
 Size in bytes of the stack used by the scheduler and interrupts if the main thread is enabled. More...
 
#define AR_MAIN_THREAD_PRIORITY
 Priority for the main thread.
 

Macro Definition Documentation

◆ AR_ENABLE_IDLE_SLEEP

#define AR_ENABLE_IDLE_SLEEP

Controls whether the idle thread puts the processor to sleep until the next interrupt.

Set to 1 to enable. The default is to disable idle sleep for debug builds, enabled for release builds.

◆ AR_ENABLE_LIST_CHECKS

#define AR_ENABLE_LIST_CHECKS

Enable runtime checking of linked lists.

Normally not required.

◆ AR_ENABLE_MAIN_THREAD

#define AR_ENABLE_MAIN_THREAD

Set to 1 to cause main() to be run in a thread.

Enabling this option will cause the kernel to automatically start prior to main() being called. A thread is created for you with the entry point set to main(). The main thread's priority is set with the AR_MAIN_THREAD_PRIORITY macro. The stack size is determined by a combination of the linker file and AR_SCHEDULER_STACK_SIZE.

◆ AR_GLOBAL_OBJECT_LISTS

#define AR_GLOBAL_OBJECT_LISTS

Set to 1 to enable the lists of all created kernel objects.

Default is enabled for debug builds, disabled for release builds.

◆ AR_SCHEDULER_STACK_SIZE

#define AR_SCHEDULER_STACK_SIZE

Size in bytes of the stack used by the scheduler and interrupts if the main thread is enabled.

This size is subtracted from the C stack size specified by the linker file. The remainder is used for the main thread itself.

◆ AR_SYSTEM_LOAD_SAMPLE_PERIOD

#define AR_SYSTEM_LOAD_SAMPLE_PERIOD

Microsecond period over which CPU load is computed.

The nominal sampler period is 1 second.

◆ AR_THREAD_STACK_PATTERN_FILL

#define AR_THREAD_STACK_PATTERN_FILL

Whether to fill a new thread's stack with a pattern.

Filling the stack with a pattern enables one to determine maximum stack usage of a thread. The downside is that it takes longer to initialize a thread. Default is enabled for debug builds, disabled for release.