|
|
Configuration of the system. More...
Defines | |
#define | CFG_OS_MAX_THREADS 16 |
Defines maximum number of threads. | |
#define | CFG_CHECK_OVERFLOW |
define this for testing overflow in semaphore/mutex | |
#define | CFG_CHECK_LOCK |
check lock issues due to preemption disabled or empty ready list | |
#define | CFG_INITIAL_GIE_IN_THREAD 1 |
defines initial state of GIE when switches to the thread | |
#define | CFG_LISTDEL_WITH_POISON |
allows marking .next field in list with special pattern during os_list1_del() | |
#define | CFG_MEM_POOL_POISON_FILL 0xDAAB |
filling pattern for free items in memory pool | |
#define | CFG_LISTDEL_POISON 0xABBA |
code that is used to mark deleted list items | |
#define | CFG_CHECK_EMPTY_SEM_DESTROY |
perform a check on semaphore destroy in os_sleep() | |
#define | CFG_CHECK_TIMER_REMOVE_LOCK |
enable location stamp of timer delete, it is useful for determination how timer was deleted (manually or becuse it expired) | |
#define | CFG_FILL_EMPTY_MEM_POOL |
fills unused memory with poison pattern (excl. with CFG_MARK_EMPTY_MEM_POOL) | |
#define | CFG_MARK_EMPTY_MEM_POOL |
marking of empty item with a poison code (excl.CFG_FILL_EMPTY_MEM_POOL ) | |
#define | CFG_ZERO_ALLOC_MEM_POOL |
new allocated memory from memory pool is filled with zeros (excl. with CFG_MARK_ALLOC_MEM_POOL) | |
#define | CFG_MARK_ALLOC_MEM_POOL |
new allocated memory from memory pool has zero marking (excl. CFG_ZERO_ALLOC_MEM_POOL), only two first bytes. | |
#define | CFG_CHECK_PTR_AT_MEM_FREE |
enables pointer check in os_mem_pool_free, may detect incorrect pointer or double free | |
#define | CFG_SCHEDULE_ISR_ON_REQ |
controls scheduling on ISR exit. When enabled it is done only when requested, otherwise is done every ISR | |
#define | CFG_DEBUG_PIN_THREADS |
enables signalling on DEBUG_PORT identifier of current thread when context is changed | |
#define | CFG_DEBUG_THREAD_MASK 0x03 |
mask for thread signalling |
Configuration of the system.
The file contains definition of the system configuration. Preprocessor symbols that are defined here control compilation of the system code. Some parts and corresponding functionality of the system are compiled conditionally and can be excluded from final release. Also, some byte patterns used for debug support are defined here.
#define CFG_DEBUG_THREAD_MASK 0x03 |
mask for thread signalling
Thread identifier (0...15) can be signalled on output pins.
When CFG_DEBUG_PIN_THREADS is defined new thread id is sent to output port and can be observed on logic analyser.
This mask selects which bits are passed to output pins. It may occupy four bits (0...3) of the port or less. By the mask you may define how many bits are illustrated on pins.
e.g.
mask = 0x03 - only two bits are visible (b0, b1) - four distinguished ids/states
mask = 0x07 - bits b0-b2 - eight ids
mask = 0x0F - all bits b0-b3 - 16 thread ids
#define CFG_OS_MAX_THREADS 16 |
Defines maximum number of threads.
It determines size of tcb table. Set it to number of threads that you use (incl. idle thread). The value must not be larger than 16