Home News Features Examples Code FAQ License
AVR Webring
Prev Hub Join Rate Next
Configuration Parameter Table

Introduction

Below, find an overview of the configuration parametes you need to set. This list is valid for Femto OS v0.86. Please have a look inside the file femtoos_config.h for a more elaborate discussion about the use. Note that there exists a template (at the bottom of femtoos_config.h) with predefined default values you can use in you own code, so you do not have to type all these parameters yourself.

System configuration
cfgSysOptimized Switch between two sets op configuration parameters
cfgSysDebug Used to debug on the Atmel Studio
cfgSysInline Force inlining of some internal methodes to reduce OS stack use.
cfgSysFramePointerCounterMeasures To suppress the use of the framepointer even further.
cfgSysReduceProEpilogue Manage the code inside the pro- and epiloge.
cfgSysRegisterCheckByte Specify the byte with which the registers are initially filled.
cfgSysStackGrowthUp Specify the direction the stack grows.
cfgSysClearUnusedR1 Setting this makes sure r1 is always cleared after a context switch.
cfgSysSubTicksPerFullTick Subdivider for the tickcounter
cfgSysSubTickPrescaler Setting of the hardware prescaler of the tick counter.
cfgSysGCCstartup Switch to replace the startup code produced by gcc
cfgSysFsStorageSpace Specfiy the total size of the storage in bytes

Interrupt handling
cfgIntGlobalOnly To indicate that timer interrupts may be treated as global.
cfgIntNonEmpty To indicate you use interrupts of your own, possibly with an isr.
cfgIntSwitchUsesOSstack Set this to let the isr run in OS space.
cfgIntOsProtected Set this to protect the Femto OS from being interrupted.
cfgIntPerTask To specify the state of interrups for each task individually.

Quality Assurance
cfgCheckReset Give a signal through the error port that the system has reset.
cfgCheckTrace Activate tracing, most OS actvities are reported.
cfgCheckWatermarks Keep watermarks of the stack and register use.
cfgCheckOsStack Check if the OS stack keeps within the given limits.
cfgCheckTaskStack Check if each task stack keeps with the given limits.
cfgCheckIsrStack Check if the isr stack keeps with the given limits.
cfgCheckRegisters Check if use is made of registers not saved on the context.
cfgCheckTiming Check if the tick is long enough to let OS and tasks do their jobs.
cfgCheckQueuFilling Check if the queu's are not overrun or underrun.
cfgCheckMethodUse Checks if you make proper use of the API.
cfgCheckApplication Activate checking of the user quality assurance.

System capabilities
cfgUseEquidistantTicks Make sure every tick takes an equal amount of time.
cfgUseVariableTimeslices Set this to make use of different timeslices for every task.
cfgUseDelay If you need delays or timeouts in your code, activate this.
cfgUseSynchronization Activate if you make use of the synchronization primitives.
cfgUseNestedCriticals If you need to nest critical blocks, activate this.
cfgUsePriorityLifting If you need to make use of priority inheritance, activate this.
cfgUseBoolReturns Activated to know if a lock was obtained or timed out.
cfgUseTaskWatchdog Activate this to protect a task against infinite loops and waits.
cfgUseCorrectWakeupTimes Activate to keep track of the last task activation times.
cfgUseTimeoutOnSync Activate to enable timeout on all synchronizing methods.
cfgUseTasknames Activate to reserve room in flash for dynamical tasknames.
cfgUseLowPowerSleep Make the Femto OS aware of low power sleep modes.
cfgUseLowPowerOnDelay Let the OS sleep as soon as all tasks are sufficiently delayed.
cfgUseLowPowerDelayRelease Activate to correct delaytimes, if the device over slept.
cfgUseLoadMonitor To keep track of the time spend in all tasks, os and isr.
cfgUseFileSystem Activate the Femto File System on EEPROM
cfgUseFileSystemConcurrentRead Separate read/write regions from read only regions.
cfgUseFileSystemEconomyMode Option to save erase/write cycles on the filesystem/eeprom
cfgUseFileSystemMaintainFAT
cfgUseEvents Lightweight messaging system between tasks and/or isr.

System numerical parameters
cfgNumWatchdogDiv Determines the frequency of watchdog checkups.
cfgNumMonitorDiv Determines the copy frequency of the load monitor.
cfgNumSleepTickBlocks Minimum number of tick blocks the delay must have for sleeping.

External calls
callAppTick00 Activates the tick hook that fires every tick.
callAppTick08 Activates the tick hook that fires every 256 ticks
callAppTick16 Activates the tick hook that fires every 65536 ticks
callAppEnterIdle Activates the idle hook that fires just before going idle.
callAppEnterSleep Enable sleep hook that fires just before going to low power sleep.
callAppExitSleep Enable sleep hook that fires just after going to low power sleep.
callAppBoot Enable initialization hook that fires before any context construction.
callAppInit Enable initialization hook that fires before context construction of each task.
callAppBark Activates the watchdog hook that fires when the watchdog barks.

API inclusions
includeTaskYield Manual context switch
includeTaskDelayFromNow Delay your task for the given number of ticks, starting from now.
includeTaskDelayFromWake Delay your task, starting at the last waketime.
includeGenSuspend Suspend a task, but do not invoke a context switch.
includeTaskSuspendMe Suspend this task and invoke a context switch.
includeGenResume Resume the given task from suspension.
includeTaskSleep Put this task to sleep and invoke a context switch.
includeTaskSleepAll Put all tasks to sleep.
includeTaskBlockSwitch Block or de-block task switching.
includeGenSetPriority Set a new priority for the given task.
includeGenGetPriority Return the current priority of a given task.
includeGenGetTickCount Get the tick counter.
includeGenAddtoTickCount Add the given number of ticks to the tick counter.
includeGenGetLastWakeTime Return the time the task was last woken.
includeTaskFeedWatchdog Feed the watchdog in order to prevent barking.
includeTaskKillWatchdog Switch off the watchdog facility for this task.
includeGenGetTaskname Get the address from a task name
includeTaskKillTask Stop (in error mode) one particular task.
includeGenReboot Reboot the system
includeTaskRestart Restart a task
includeGenLogTask Binary oneliners about every task
includeGenLogOs Binary oneliner about the os
includeGenTrace Send a byte trough the trace
includeGenPipeInt16 Auxiliary function to push a Tint16 on a pipe
includeGenPassFlashString Auxiliary function to push a string on a pipe
includeTaskWaitForEvents Lock this task until the required event is fired.
includeGenFireAllEvents Release all tasks waiting on events.
includeTaskWaitForOtherTask Lock this task until a second task passes on the same slot.
includeTaskWaitForTasks Lock this task until N other tasks pass on the same slot.
includeGenWaitRelease Release all wait locks on this slot.
includeTaskMutex Try to obtain or release a mutex on the given slot.
includeTaskQueu Try to obtain or release a lock on a queu for n bytes.
includeGenQueuWrite Write a byte on the queu.
includeGenQueuRead Read a byte from the queu.
includeGenQueuClear Clear the queu.
includeGenQueuPeek Look ahead what the next byte to read would be.
includeGenQueuReadable See how many bytes can be read from the queu.
includeGenQueuWriteable See how many bytes can be written to the queu.
includeGenQueuFull See if the queu is full.
includeGenQueuEmpty See if the queu is empty.
includeTaskFileAccess Open and close a file.
includeTaskFileFormat Clear the whole filespace (formats the FAT too).
includeTaskFileGetSize Get the size of a file.
includeTaskFileSetSize Set the size of a file.
includeTaskFileReadByte Read a raw byte from a file
includeTaskFileWriteByte Write a raw byte to a file
includeTaskFileAppendByte Append a byte to a file
includeTaskFileReadPipe Read bytes in a stream from a file
includeTaskFileWritePipe Write bytes in a stream to a file
includeTaskFileReadBuffer Read bytes from a file and put them in a buffer
includeTaskFileWriteBuffer Write bytes from the buffer to a file
includeTaskSwitchGlobalInterrupts Enable/disable global interrupts.
includeTaskSwitchTickInterrupts Enable/disable tick interrupts.
includeTaskProtectGlobalCritical Disable/enable global interrupts, keep track of the level depth.
includeTaskProtectTickCritical Disable/disable tick interrupts, keep track of the level depth.
includeIsrEnter Start the isr by a context switch.
includeIsrExit End the isr, switch to the OS.
includeIsrBegin Start the isr, switch to the isr stack.
includeIsrEndReturn Stop the isr, return to the place where the interrupt occurred.
includeIsrEndYield Stop the isr, yield as quickly as possible.
includeIsrStartLoad Start the stopwatch measuring time inside an unmanaged isr
includeIsrStopLoad Stop the stopwatch measuring time inside an unmanaged isr
includeTaskStackCheck Call to check how much free space is left on the task stack.
includeIsrStackCheck Call to check how much free space is left on the isr stack.

General parametrization
CN_[xx] Specify the names of the tasks.
Include_[taskname] State which tasks are to be incorporated and how they are started.
Capabilities_[taskname] State per task what its capabilities must be.
StackSize_[taskname] Specify the stack of each task.
TimeSlice_[taskname] Specify how much run time each task gets per turn.
TaskName_[taskname] Specify dynamical task names.
Priority_[taskname] Specify the intial priority of each task.
RegisterUse_[taskname] Specify which registers are used by each task.
RegisterCheck_[taskname] Specify which registers should be checked on each context switch.
InterruptStart_[taskname] Specify wich interrupts must be activated when each task is started.
EN_[xx] Specify the names of the events.
FileSpace_[filename] Specify the space (maximum size) of each file.
SN_[xx] Specify the names of the slots.
SlotSize_[taskname] Specify the size of each slotstack per task.
SlotUse_[slotname] State how you will utilize each slot.
QueuSize_[slotname] Specify the size of each queu.
FN_[xx] Speficy the file names.

Other configuration
StackSafety Specify the free space required on the stack when cheking its use.
StackSize_OS Specify the stack of the OS.
StackSize_ISR Specify the stack of the isr.
TimeSlice_IdleTime Specify how much run time the idle time gets.
InterruptStartDefault Specify wich interrupts must be activated when each task is started.
FileSpaceDefault Specify the space default filesize

Detailed descriptions

cfgSysOptimized: Switch between two sets op configuration parameters
#define cfgSysOptimized: (cfgTrue | cfgFalse)
Demo applications come in two flavours: 'optimized' and 'not optimized'. This is only about the configuration parameters, the code is identical. Since it is likely the optimization done for a particular version of the compiler and circumstances will lead to incorrect code for an other version, we distribute the examples with optimization switched off. You can simply test the optimized version for all examples by switching this to true.
     However, it is better to do the optimization per application by hand (following the optimization instructions). Probably you will find slightly different values for the registers used and the stacksizes. This configuration parameter is, and should be, only used inside the config_application header code.
     This option can be overridden from the command line by using defExtOptimized. If that is set to cfgTrue or cfgFalse its value overrides the value defined in your config file.

cfgSysDebug: Used to debug on the Atmel Studio
#define cfgSysDebug: (cfgTrue | cfgFalse)
There is no standard way to debug the OS. The most usable form of debugging i found is making use of a simulator. Some of the example code contains values making is more easy to debug an application by reducing wait times. The AVR simulator from Atmel is not able to simulate the timers, so a trick is used. Note the code compiled with debug == cfgTrue cannot be run on real hardware.

cfgSysInline: Force inlining of some internal methodes to reduce OS stack use.
#define cfgSysInline: (cfgTrue | cfgFalse)
Some methods use quite a bit of stack, i.e. they start by saving say 8 or more registers on the context. This implies not only 8 more bytes of ram use, but also 32 extra flash bytes just to store and retrieve the registers. This must be weighted against inlining those methods. Less stack, more flash, but maybe not that much more. It really depends which resource is limited. If you set inline to true you use less OS stack (Typically noticeable when using watchdog, restart of queu functionality) but more flash. Experiment to find the optimal setting. Note that changing this to false may require the need to increase OSstack. Test!

cfgSysFramePointerCounterMeasures: To suppress the use of the framepointer even further.
#define cfgSysFramePointerCounterMeasures: (cfgTrue | cfgFalse)
Sometimes the GCC compiler uses a frame pointer although we explicitly asked not to do so by -fomit-frame-pointer. It may be unavoidable at times, but GCC is not perfect and sometimes misses he can use a free register instead of a frame pointer. Framepointers cost a lot of space in terms of flash and ram. For small functions, the avr architecture should normally not need one. If it does so, you can activate the counter measures for the OS. This boils down to binding variables to registers. It is not always succesfull, for the compiler might ignore such requests.

cfgSysReduceProEpilogue: Manage the code inside the pro- and epiloge.
#define cfgSysReduceProEpilogue: (cfgNaked | cfgBikini | cfgComplete)
A lot of functions do not need to save any registers at entrance since they do not return but enter the OS system internal handeling. That would be a wast of code. To make all these functions naked, you can the parameter cfgSysReduceProEpilogue to cfgNaked. This works wunderful as long as no frame pointers are used. Normally they are not needed, the functions are small and do not contain a lot of variables, there should be plenty of registers free on the avr. (Of course you compile with -fomit-frame-pointer)
     However, GCC does sometimes still use a frame pointer, see the discussion on the cfgSysFramePointerCounterMeasures parameter. In that case you should not use naked functions, since naked functions do not contain frame pointer setup code. In that case you have two options if cfgSysFramePointerCounterMeasures do not eliminate the framepointers. Set cfgSysReduceProEpilogue to cfgBikini if you make use of my hack of the avr beackend of the gcc compiler, or set it to cfgComplete. This is save, but may increase your code dramatically for full pro- and epiloge code is used on all functions.

cfgSysRegisterCheckByte: Specify the byte with which the registers are initially filled.
#define cfgSysRegisterCheckByte: (0x00 .. 0xFF)
If you make cfgCheckTaskStack == cfgTrue the registers are filled with the value giving at cfgSysRegisterCheckByte. Each time a context switch occurs, registers said not to be used in the RegisterUse by that task are compared with the byte. In theory it is possible that a register was used, but filled with the byte you selected. To be absolutely sure, run your code several times with different values of the cfgSysRegisterCheckByte.
     If you use tracing, it may be handy to use for this value 0xA5. This value is not defined for regular trace notifications. Thus if it appears in your tracing non the less, you know that a so called non used register leaked trough to the first parameter register, probably you missed some registers needed to be saved.
     If you want to measure which registers are used, (opposite to analyzing the assembly) you can set this value to the same value as the stack is initialized with (defStackInitByte, usually 0). Now, registers which are context saved but not used cannot be separated from the non-saved registers, so they do not appear it the watermark measurement (activate it). So it gives an indication which registers could be removed from context saving.
     This method has two drawbacks. (1) Still there may be registers which are changed, but do not have to be saved, since they are only saved in tick interrupt protected code. (2) Some registers may actually be in use, but contain zero for a longer period of time. This is can only be detected by changing defStackInitByte to some other value, but at the risk of contaminating r1.

cfgSysStackGrowthUp: Specify the direction the stack grows.
#define cfgSysStackGrowthUp: (cfgTrue | cfgFalse)
Depending on the hardware the stack may run upwards (for example AVR or ARM) or downwards. During the development of Femto OS i did not have hardware with the stack running upwards, so the setting cfgSysStackGrowthUp == cfgTrue does not work properly at this moment.

cfgSysClearUnusedR1: Setting this makes sure r1 is always cleared after a context switch.
#define cfgSysClearUnusedR1: (cfgTrue | cfgFalse)
Gcc assumes r1 is cleared on AVR architecture at all times. It would be pretty wasteful to store 0 on the context however. Worse, we must not only store r1, but r0, r2 and r3 also. That means four bytes of ram wasted just to store 0. Thus, you may set this to cfgTrue, and the restore context makes sure r1 is cleared at the beginning, if you did not store it. If you do store it, it is not cleaned. This is because there may be instructions (like the multiply on the avr) which actually force you (the compiler) to make use of it.
     The initial value of r1 equals zero, (because of defStackInitByte) and that should stay that way provided it is not changed by hand. On the other hand, if you use assembler, you may not want this at all. In general it is save to set this to cfgTrue, even if you store r1 on the context, it costs some extra bytes though. It is not save to leave it to cfgFalse when you do not store the registers r0-r3, in any of your tasks, since gcc still assumes r1 to be zero. This may lead to very funny results and bugs which are very hard to track down.

cfgSysSubTicksPerFullTick: Subdivider for the tickcounter
#define cfgSysSubTicksPerFullTick: (1 .. 256)
The value of the subtick counter at which the tick counter is increased by one. We assume the tick counter is generated in the port by a hardware counter passing a certain value, thereby generating an interrupt. This hardware counter produces the subticks, and the number of Subticks per full tick must be given here. You give the value taking into account a couple of conditions.
     First, make sure the value of cfgSysSubTicksPerFullTick give rise to the tick time of the desired length. This, by itself cannot be given as a parameter directly.
     Second, make sure that the hardware counter is able to count on some more before overflowing, depending on the variation you need for the time slices, so you don not want to make it to high.
     Third, the accuracy of the delay timers also depend on this number, this you don't want to make it to low either. Rule of the thumb, make it 1/8 of the maximum of your hardware counter. Then you can have tasks running approximately 7 ticks without being interrupted, and you have timer resolution of approx 3%.

cfgSysSubTickPrescaler: Setting of the hardware prescaler of the tick counter.
#define cfgSysSubTickPrescaler: (1,8,64,256,1024)
The divisor of the system clock to the subtick counter. This is highly system dependent, but for most architectures the timer clocks are derived form the system clock by some prescaler. You must choose a value here in such a way that the subtick counter gets 'the right speed'. This is your formula:
     TickFrequency = SystemClockFrequency / (cfgSysSubTicksPerFullTick * cfgSysSubTickPrescaler )
     Note that you cannot just change the value to your liking. The port file must support it, and it is likely it only supports a few predefined fixed values, such as 1,8,64,256,1024 for the attiny861.

cfgSysGCCstartup: Switch to replace the startup code produced by gcc
#define cfgSysGCCstartup: (cfgOverride | cfgReplace | cfgKeep)
Gcc produces startup code far from optimal for our (and most other) situation:
  • the stack is set, since we don't need it, it is a waste: 8 bytes down the drain
  • main is called rather than jumped to, a waste since returning makes no sense: 2 ram bytes gone
  • empty .data section is copied: 22 bytes gone
  • at least three unneeded jumps: 6 bytes
  • an interrupt vector table you might not need, 26 bytes
You can define your own startup code and activate it here. The little price you pay is that, at startup, all ram must be cleared, since we don't know exactly which part was used. (information only available at compile time). This is done with the option cfgOverride. You can also completely define your startup files, inclusive your own interrupt vector table. In that case specify cfgReplace. If you want gcc to decide everything set it to cfgKeep.
     It may not be possible to set this to cfgReplace for certain combination of other configuration settings. This will lead to a clear error.
     IMPORTANT: if you set this to cfgReplace add the option -nostartfiles to the linker. If you set it to cgfKeep or cfgOverride, DO NOT FORGET to remove that option, otherwise the code cannot be executed. This option can be overridden from the command line by using defExtGCCstartup. If that is set to cfgKeep, cfgOverride or cfgReplace its value overrides the value defined in your config file.
     Note: the functionality of this option maybe compiler version dependant.

cfgSysFsStorageSpace: Specfiy the total size of the storage in bytes
#define cfgSysFsStorageSpace: (0 .. SIZE_OF_EEPROM)
The total amount of bytes used for the file system schould be given here. Usually the file system is defined in onboard EEPROM, and you can use all of it. However, you can also decide to reserve half of it for other purposes for example. Per default the filesystem starts off at address 0x000.

cfgIntGlobalOnly: To indicate that timer interrupts may be treated as global.
#define cfgIntGlobalOnly: (cfgTrue | cfgFalse)
Normally blocking for timer interrupts and global interrupts are separate worlds. Most methods of the OS are blocked for timer interrupts but not for global interrupts (except when needed). If you however do not have any other interrupts present, you may decide not to make this distinction. All timer interrupt protection code is now replaced by global protection code, even in your code, if you made proper use of the taskXXXXXTickInterrupts methods. It can shorten the code, but, if you use interrupts for other purposes, it can make you app less responsive, since all functions now generally block all interrupts.

cfgIntNonEmpty: To indicate you use interrupts of your own, possibly with an isr.
#define cfgIntNonEmpty: (cfgTrue | cfgFalse)
If you make use of interrupt really executing some code (not counting timer interrupts or watchdog interrupts and so) set this to cfgTrue. It makes the use of the isrXXXX methods possible and makes sure the StackISR is included in the code if needed.

cfgIntSwitchUsesOSstack: Set this to let the isr run in OS space.
#define cfgIntSwitchUsesOSstack: (cfgTrue | cfgFalse)
There are two kinds of interrupt handling. One were the interrupt directly forces a context switch and one where the interrupt method itself is responsible for the saving of the registers used. For the former method, you may decide whether you want to make use of the OS stack or the ISR stack. If you use only context switching interrupts, you do not need a ISR stack at all, simple make use of the OS stack and set the parameter to cfgTrue.

cfgIntOsProtected: Set this to protect the Femto OS from being interrupted.
#define cfgIntOsProtected: (cfgTrue | cfgFalse)
If your interrupts use ANY of the genXXXX functions, set this to cfgTrue. The internals of the OS and genXXXX functions are now protected. If your interrupts do not use such functions this may (but must not) be set to cfgFalse. Interrupts are now possible on any moment (except during context switch, since we may not have a valid stack there), so that its code is more responsive. You may use your own communication with the tasks (a shared boolean for instance)

cfgIntPerTask: To specify the state of interrups for each task individually.
#define cfgIntPerTask: (cfgTrue | cfgFalse)
The initial state of the interrupts (global, tick) can be specified for each task separately or for all tasks at once. The latter of course takes less memory. The state of the interrupts are kept over manual switches to the OS (and naturally with preemptive context switches)

cfgCheckReset: Give a signal through the error port that the system has reset.
#define cfgCheckReset: (cfgTrue | cfgFalse)
If you activate this option Femto OS will call portShowReset at every reset. Normally this happens only when you, yes, reset the system or reboot it. However, if your code gets lost somewhere often this results in a system reset. It is very neat when you can spot this.

cfgCheckTrace: Activate tracing, most OS actvities are reported.
#define cfgCheckTrace: (cfgTrue | cfgFalse)
With this option it is possible to trace what is happening in your system Most actions and api function calls will generate a trace event. Setting this to true may seriously slow down the system, depending on the trace handler implementation. Every task switch, api function call, error etc is reported.

cfgCheckWatermarks: Keep watermarks of the stack and register use.
#define cfgCheckWatermarks: (cfgTrue | cfgFalse)
Activate this to see which registers are used and what the highest use of the stack of all tasks may be. These are estimates, measured at certain moments. There is no way to be absolutely sure about the real heights of the stack or real register usage. Note that if you activate cfgCheckRegisters also, only those registers are collected in the watermark that are checked at, since otherwise this could lead to spurious errors. If cfgCheckRegisters is de-activated the use of all registers is monitored. Furthermore, activating cfgCheckWatermarks alone never leads to an error report, even if the stack overflows or unsaved registers are used. You must activate these options separately.

cfgCheckOsStack: Check if the OS stack keeps within the given limits.
#define cfgCheckOsStack: (cfgTrue | cfgFalse)
Set to cfgTrue to let the OS check its own use of the stack. The free space of the OS stack is measured in the deepest calls of the OS. The StackSafety parameter is NOT taken into account. The use of the OS stack is highly dependent of the capabilities and on the setting of of the cfgCheckTaskStack parameter, but not so much on the used methods of the system.
     Therefore, it is best to first test with cfgCheckOsStack and cfgCheckTaskStack set to cfgTrue. Then, first switch of cfgCheckTaskStack and reduce the StackOS as much as possible. If the system runs error free, you may switch off cfgCheckOsStack too. Since the call to the method checking the OS is two bytes by itself, sometimes the OS Stack can be reduced two bytes more, but this is risky. Please note that running without errors and/or cfgCheckOsStack with set to cfgTrue is no absolute guaranty the stack will not overflow.

cfgCheckTaskStack: Check if each task stack keeps with the given limits.
#define cfgCheckTaskStack: (cfgTrue | cfgFalse)
This is your life saver. It checks unauthorized use of the stack on every context switch. Usually it reports an error and shuts the task down before the stack overflows. It requires quite some extra code and OS stack space though. This should not be a problem. When all the testing is done you can switch the option to cfgFalse and be reasonable certain, that no further stack overflow occurs.
     If you have really deep functions where a context switch cannot occur use the option includeTaskStackCheck and implement its function. With this you can check how much space is really left.

cfgCheckIsrStack: Check if the isr stack keeps with the given limits.
#define cfgCheckIsrStack: (cfgTrue | cfgFalse)
In an isr no context switching occurs, so the only way to check this stack is the option includeIsrStackCheck. Switch this option on if you want to effectuate the checking.

cfgCheckRegisters: Check if use is made of registers not saved on the context.
#define cfgCheckRegisters: (cfgTrue | cfgFalse)
This is a life saver too. It checks unauthorized use of registers on every context switch. It reports an error and shuts the task down before the task is restarted with erroneous registers. Checking on the registers is a little to strict, since registers only used with interrupt protected area's need not to be saved on the context. However, the system cannot make that distinction, so it reports on the save side. If you know exactly what you are doing, you may reduce the number of registers after you have switched off this option. The use of the Tbit is also checked with this option.

cfgCheckTiming: Check if the tick is long enough to let OS and tasks do their jobs.
#define cfgCheckTiming: (cfgTrue | cfgFalse)
Activate this option to check the issues having to do with timing. For example, check if there is enough time left for the tasks to run, or if the delays are calculated in an orderly manner.

cfgCheckQueuFilling: Check if the queu's are not overrun or underrun.
#define cfgCheckQueuFilling: (cfgTrue | cfgFalse)
Queus may be written to, even if there are full. This is important, since inside an isr you cannot block and wait until the queu is read. The same applies for reading, this may be done on an empty queu. However, you can not expect sensible results when doing so, the only guarantee you have is that the system does not deadlock.
     Thus, it would be nice if you can see if such a situation occurs. By setting the option to cfgTrue, overrun and underrun of the queus become an error, but only when called from a task. When called from inside an isr environment, superfluous bytes are still silently ignored and zero bytes are provided when the the queus is empty. This is because we do not know how to act after an error in that case.

cfgCheckMethodUse: Checks if you make proper use of the API.
#define cfgCheckMethodUse: (cfgTrue | cfgFalse)
There are several rules about how to use the API of the Femto OS. It is your responsibility to honor them. For example, Slot 0 may not be used, priorities may not exceed 7 etc. The OS does not protect you from misuse, since in embedded systems there is usually no one who can click on the OK button when an error is reported. But during development you can check most of the rules on use by switching on this option.

cfgCheckApplication: Activate checking of the user quality assurance.
#define cfgCheckApplication: (cfgTrue | cfgFalse)
Use this switch for you own application, to switch on some leds or other means of quality assurance. This option is not used in Femto OS. It is reserved for user application purposses.

cfgUseEquidistantTicks: Make sure every tick takes an equal amount of time.
#define cfgUseEquidistantTicks: (cfgTrue | cfgFalse)
The femto OS used a feature called Honest Time Slicing. This means that every task gets the full time slice when it starts. This is useful when you have several tasks running indefinitely, just to make sure they all get a fair part of the time.
     There are reasons however to use the standard tick interrupt system, where all tick interrupts come a fixed times. If all you tasks are blocking, for example, or if you need to derive from that time base. In the latter case set this option to cfgTrue, it saves some code too.
     Further, Honest Time Slicing introduces some extra rounding errors in the timing model which makes the tick counter less accurate as a system clock as the oscillator crystal would be. If you set this option to cfgTrue however, the tick counter is firmly coupled to the system clock, so that, if you want to use the tick counter as a time source, you only need to calibrate the system clock, i.e. the crystal. Some hardware may be driven by very accurate crystals, and then, with this option set to cfgTrue, you can make an accurate clock.

cfgUseVariableTimeslices: Set this to make use of different timeslices for every task.
#define cfgUseVariableTimeslices: (cfgTrue | cfgFalse)
If you use Honest Time Slicing, thus setting cfgUseEquidistantTicks to cfgFalse, you may want to vary the time slice size per task. This is useful when some tasks need to run a little longer without interruption, a bus system for example. Set this option to cfgTrue and determine per task how long it may run. The time the idle tasks runs can be varied anyway, also when this option is set to cfgFalse.

cfgUseDelay: If you need delays or timeouts in your code, activate this.
#define cfgUseDelay: (cfgTrue | cfgFalse)
If you want to delay some tasks, activate this option. In the system this enables keeping track of task waiting for some time and than being rescheduled. If you make use of timeouts on synchronization primitives, you must also enable this option.
     Also, if you want to make use of cfgUseCorrectWakeupTimes you must enable it, since it makes use of delayed tasks. If you just use Femto OS as a simple scheduler without delays, you can set this to false. That saves some code and two bytes of ram per task.

cfgUseSynchronization: Activate if you make use of the synchronization primitives.
#define cfgUseSynchronization: (cfgSyncNon | cfgSyncSingleSlot | cfgSyncSingleBlock | cfgSyncDoubleBlock)
Specify here how you want the synchronization to be used. All synchronization infomation is kept in a slotstack, one for each task. The size of that stack can be defined further below. The way this is stack is 'formatted', is choosen here. The more complex the formatting, the more possibilities and the more code generated by the preprocessor. You can choose from cfgSyncSingleSlot, cfgSyncSingleBlock, cfgSyncDoubleBlock and cfgSyncNon.
     If you do not want to make any use of synchronization set this to cfgSyncNon. Please note that, although no code is included to handle slots, the slotstacks may still claim ram. Set them explicitly to zero if you do not need them. If you choose for cfgSyncSingleSlot, one slot may be occupied per task at every moment and no nesting is allowed. This takes one byte for every task using slots. It makes no sense to define the SlotSizes larger than one (and it is forbidden, to make sure we can optimize the code).
     If you choose for cfgSyncSingleBlock, every task may hold one blocking slot at a time, and may use the rest of the bytes in the slotstack for other free locks or nesting. Every byte can hold two slots (one per nibble). If you choose for cfgSyncDoubleBlock, every task may hold two blocking slots, on which it blockes simultaneously. The other bytes in the slotstack are used for free locks.

cfgUseNestedCriticals: If you need to nest critical blocks, activate this.
#define cfgUseNestedCriticals: (cfgTrue | cfgFalse)
Critical sections can be made by disabling/enabling interrupts over the region you want to protect. However, this approach cannot be nested, since, when the deepest level is left, interrupts are enabled again. This nesting may occur over function calls and is therefore hard to monitor.
     If you only have one level, there is no need for nesting, but otherwise, you have the option to switch cfgUseNestedCriticals to cfgTrue. Now the system keeps track of the nesting for you. The maximum number of levels depend on the use of the types of interrupts you need to protect. If is is one kind (e.g. either Global or Tick interrupts) you have 16 levels, if you use both, you have 4 levels per interrupt, which may be mixed.
     If you switch this option to cfgFalse, all enter/exit critical calls are mapped to standard disable/enable calls by the preprocessor. Note, the nesting of mutexes/queu's is handled in a separate option. And second, note that, the OS itself does nest the switching of interrupts, but does not make use of this system, so in fact all levels are available for own use.

cfgUsePriorityLifting: If you need to make use of priority inheritance, activate this.
#define cfgUsePriorityLifting: (cfgTrue | cfgFalse)
A high priority task may block on a low priority task. If that low priority task never gets any processing time because, for example, there is a non blocking task at medium priority, the high priority task hangs too. In that case you may switch on cfgUsePriorityLifting. Blocking tasks sharing the same synchronization lock are lifted to the priority of that of the task with the highest priority. This, however is temporary. As soon as the lock is released, the priorities are restored to there initial value. Beware, the are not restored to there last value, but to the value it started with at the beginning, i.e. the priority of Priority_XXXX.

cfgUseBoolReturns: Activated to know if a lock was obtained or timed out.
#define cfgUseBoolReturns: (cfgTrue | cfgFalse)
Some switching synchronization calls may return with a boolean indicating if a lock was obtained or it timed out. For this functionality to work, you must switch on this option. When set to cfgFalse, the returned value is unpredictable, but is saves code. At the moment this only makes sense in combination with cfgUseTimeoutOnSync == cfgTrue.

cfgUseTaskWatchdog: Activate this to protect a task against infinite loops and waits.
#define cfgUseTaskWatchdog: (cfgTrue | cfgFalse)
You can protect your tasks with a watchdog. If you set this option to cfgTrue, all tasks which contain a bark() method are called when the watchdog expires, if you activated the callAppBark. Shortly before the task is reinitilialized (stack/variables cleaned) and afterwards restarted (loop called). Only the priority of the task is retained, the rest of the status info is renewed.
     The init code of the task, if present, is not called. Redo any work in the bark section, or call init from bark. The watchdog must be activated per task separately, since it is likely you only want to protect only some tasks, bus drivers for example. After a restart the watchdog is deactivated, as it always is when a task starts. Please note that only (!) running tasks are watched. A blocking, delayed of sleeping task can never be barked at. Thus if two tasks are waiting on each other in a block, these tasks may still deadlock.

cfgUseCorrectWakeupTimes: Activate to keep track of the last task activation times.
#define cfgUseCorrectWakeupTimes: (cfgTrue | cfgFalse)
Setting this to cfgTrue makes sure that for every take the last wakeup time is recorded correctly. It is recorded correctly always when only delays are used to block a task. However, if tasks are also woke from suspension or sleep, or are deblocked by releasing semafores, these times are not automatically correct. You may need correct times when you use includeTaskDelayFromWake for example. If you activate this option correct wake uptime are kept internally. cfgUseDelay must be activated, for this option to make sense.

cfgUseTimeoutOnSync: Activate to enable timeout on all synchronizing methods.
#define cfgUseTimeoutOnSync: (cfgTrue | cfgFalse)
Blocking calls on synchronizing methods may be given a timeout parameter. For this to be effective though, i.e. in order to make sure the code is present for releasing the task on a timeout, this option must be set to cfgTrue. Otherwise the timeout parameter is ignored, and the call or returns with the lock obtained or never returns. The return value itself is undefined, and may even be false, in that case. Activating this implies activation of cfgUseDelay (if cfgUseSynchronization is not equal to cfgSyncNon), even if cfgUseDelay is set to false, internally, but you must still activate cfgUseDelay uf you want to make explicit use of delays.

cfgUseTasknames: Activate to reserve room in flash for dynamical tasknames.
#define cfgUseTasknames: (cfgTrue | cfgFalse)
All tasks have compile time (literal) tasks names. This makes handling more easy. Usually the presence of dynamical task names is a waste of space, since nobody is watching the embedded system. Besides, tasks cannot be dynamically loaded or unloaded, so it is know on any time which tasks are running ;-) However there may be reasons where dynamical task names may be handy, and this is the option you need to set to cfgTrue in order to make use of them. If it is set to cfgFalse, the names are not compiled in, regardless if they are specified below.

cfgUseLowPowerSleep: Make the Femto OS aware of low power sleep modes.
#define cfgUseLowPowerSleep: (cfgTrue | cfgFalse)
As soon as all tasks are put to sleep or have stopped for an other reason (stopped due to an fatal error, suspended or locked by a semaphore) and thus the only tasks left is the idle task, the system can go to a low power mode instead of the idle task, if this option is set to cfgTrue. Timer interrupts are stopped. Note that, if only this option is set to cfgTrue, the system will not go to sleep if there are still delayed tasks left.)
     Its your responsibility (in the port.c file) to make sure the system wakes up again, and correct the tick counter if needed. Please note that passed tick hooks are not catched up, except the appTick16() if you restore the tick counter. Upon wake all sleeping tasks are woken per default.

cfgUseLowPowerOnDelay: Let the OS sleep as soon as all tasks are sufficiently delayed.
#define cfgUseLowPowerOnDelay: (cfgTrue | cfgFalse)
If the tasks that are not put to sleep are delayed long enough, it may be sensible to put the system in low power too. The minimal delay time for this to happen is set in the parameter cfgNumSleepTickBlocks. Thus if the system enters idle with all tasks either stopped for any reason or delayed long enough the system will to to sleep if this option is set. Requires the activation of cfgUseDelay.

cfgUseLowPowerDelayRelease: Activate to correct delaytimes, if the device over slept.
#define cfgUseLowPowerDelayRelease: (cfgTrue | cfgFalse)
The function call for LowPowerSleep contains a parameter which indicates the maximal sleep time. If the low power sleep takes no longer as this parameter indicates, it is guaranteed that no timer delay tasks have been expired during the sleep so no waking up is necessary. If it is however not certain that the sleep time was equal or shorter as the max sleep time, it may be needed to wake up some delayed tasks (standard sleeping tasks are woken anyhow). Then set this option to cfgTrue. Note, that it is still your responsibility to adjust the tick counter. If you forget, it will be to the system as if no time has passed at all. Requires the activation of cfgUseDelay.

cfgUseLoadMonitor: To keep track of the time spend in all tasks, os and isr.
#define cfgUseLoadMonitor: (cfgTrue | cfgFalse)
With this option it is possible to monitor how much time is spend in each of the tasks. Compare it to the traditional task manager. You must read the accumulated values at hand. The values are measured in subticks. Activating this option increases the ram use a lot. The OS has to keep track of the Time spend in the OS itself (4 bytes) and the idle time (4 bytes) and possible the ISR (5 bytes) and per task spend time must be collected and stored (4 bytes per task). So if you have four tasks or so with an interrupt this facility costs 29 bytes of ram extra!

cfgUseFileSystem: Activate the Femto File System on EEPROM
#define cfgUseFileSystem: (cfgTrue | cfgFalse)
With this option you can indicate that you want to make use of the Femto File System that is defined as FS on the EEPROM. Synchronized access (single write, multiple read) to the EEPROM is organized by the FFS and there is no need to use slots. Also, the system blocks the writing task until the burnlock on the eeprom has been released.

cfgUseFileSystemConcurrentRead: Separate read/write regions from read only regions.
#define cfgUseFileSystemConcurrentRead: (cfgTrue | cfgFalse)
This option enables you to choose to open a file in read/write mode or in read mode only. The advantage of the latter is that more tasks can simultaneously read from the file system. If an other task wants to write, no new reader tasks are allowed any more until all readers are finished. Then (one) writing task is allowed. This is also known are a singlewritermultiplereader synchronizer. But even if you have one task active at most on the file system it can be handy, since tasks that are only reading on the file system may be put to sleep, whereas writing tasks are never.

cfgUseFileSystemEconomyMode: Option to save erase/write cycles on the filesystem/eeprom
#define cfgUseFileSystemEconomyMode: (cfgTrue | cfgFalse)
Normally writing a bytes triggers an erase before the write. However, depending on the content of the byte written, this may not be necessary. If you activate the economy mode, every byte is read prior to being written and on the basis of the content it is decided if an erase, a write or both are needed. Of course, this increases the code somewhat and introduces some more overhead. On the other side, you the eeprom will last longer (less erases) and the writingtime will be shorter on average. This option is only available on devices that support split byte porgramming.

cfgUseFileSystemMaintainFAT:
#define cfgUseFileSystemMaintainFAT: (cfgTrue | cfgFalse)

cfgUseEvents: Lightweight messaging system between tasks and/or isr.
#define cfgUseEvents: (cfgTrue | cfgFalse)
There are eight events which can be given a name. A task may send and event or may block waiting on one or more events to take place. An event may be fired from an isr, even if the OS is made interruptable. The event itself is not stored. As it takes place, all tasks blocking on that particular event are released. If a task blocks after an event has taken place, it has to wait for a new event. Tasks that block on more than one event are released when all events have taken place at least once.

cfgNumWatchdogDiv: Determines the frequency of watchdog checkups.
#define cfgNumWatchdogDiv: (0 .. 7)
This is the divisor of the watchdog down counter. In other words, the watchdog counter, which starts at (an internal value of) 3 is decremented by one every (2^n) * 256 ticks. The (2^n)*256 tick boundary is used to determine that moment. Depending on when the watchdog is started, the first decrement may directly be after the first reset of the watchdog, or a full period of (2^n) * 256 - 1 ticks later. If the watchdog counter itself reaches 1 it starts barking. Thus, this mechanism only guaranties a minimum sleep time of the watchdog, namely (2^n)*256 ticks. n is in the interval : 0<=n<=8. Thus, for a given n the minimum watchdog time equals (2^n)*256 ticks, the maximum watchdog time 2*(2^n)*256 -1.

cfgNumMonitorDiv: Determines the copy frequency of the load monitor.
#define cfgNumMonitorDiv: (0 .. 7)
Specify the divisor if the load entry timer. The mechanism is the same as for the watchdog down counter. Since the load logging is a periodic activity it is not really important when the log event occurs. It can thus occur every 256, 512, 1204 etc ticks. Please note that, if you choose your value to high some load counters may overflow. The maximum number of ticks that can be monitored is 65536 / cfgSysSubTicksPerFullTick. For cfgSysSubTicksPerFullTick = 32, this is 2048, leading to a divisor of 3.

cfgNumSleepTickBlocks: Minimum number of tick blocks the delay must have for sleeping.
#define cfgNumSleepTickBlocks: (0 .. 255)
Set the minimum number of Tick Blocks the shortest delay must have in order to go to low power sleep. A tick block is 256 ticks. Note that the option cfgUseLowPowerOnDelay must be set to cfgTrue (and cfgUseLowPowerSleep of course)

callAppTick00: Activates the tick hook that fires every tick.
#define callAppTick00: (cfgTrue | cfgFalse)
If there is some work that must be done every tick define your own tick00() method and set this option to cfgTrue. Now is is called every tick. Needles to say you must keep the work short. The code runs in OS stack space, and the system cannot check if the OS stack overflows inside your code, so be careful, and check you assembler how much stack is used in the code. Although called every tick, the calls may not be equidistant in time. This heavily depends on the way you set up the time slice parameters.
     If use is made of cfgUseEquidistantTicks == cfgTrue the calls should be fairly constant over time (aside from interrupts), and if you use variable time slicing, it may get silent for longer timers, up to several times the tick time, and than these are caught up afterwards. Note that you can be sure that on every call the tick counter itself only is incremented by one since the last call. (Not that you can do much with the tick counter, you cannot get it's value form inside the tick hook) The only exception being when the system is in low power sleep. The missed calls due to a low power sleep are not caught up.

callAppTick08: Activates the tick hook that fires every 256 ticks
#define callAppTick08: (cfgTrue | cfgFalse)
This method is called every 256 ticks, and always after the tick00 has been called. Further the same conditions apply.

callAppTick16: Activates the tick hook that fires every 65536 ticks
#define callAppTick16: (cfgTrue | cfgFalse)
This method is called every 65536 ticks, so when the tick counter overflows. It may be used to extend the tick counter to 32 bits, if needed. Note that, due to the rounding errors in the timer model, it is not particularly well suited to make an accurate clock, only perhaps when cfgUseEquidistantTicks is set to cfgTrue. You still have the drift of the driving crystal though.
     When in low power sleep, this call is of course skipped. If however, you manually correct the tick counter after sleep, and the sleep time was less than one full round (<65536 ticks) than the appTick16() call is made anyway so that for instance, your 32 tick counter remains accurate.

callAppEnterIdle: Activates the idle hook that fires just before going idle.
#define callAppEnterIdle: (cfgTrue | cfgFalse)
Just before the system goes idle you can perform some tasks when installing the hook appEnterIdle(). If you do so, activate it here by setting this option to cfgTrue. You code is run with tick interrupts disabled, so be very brief. Depending on the setting of the interrupt options other interrupts may occur. Of course the call runs in OS space.

callAppEnterSleep: Enable sleep hook that fires just before going to low power sleep.
#define callAppEnterSleep: (cfgTrue | cfgFalse)
Just before the system goes to sleep appEnterSleep() is called. You can perform last tasks before the low power mode is activated. The time spend in your routine is not counted for, so be very brief. The call runs in OS space, and global interrupts are enabled, but tick interrupts are not.

callAppExitSleep: Enable sleep hook that fires just after going to low power sleep.
#define callAppExitSleep: (cfgTrue | cfgFalse)
Just after the sleep period is over appExitSleep() is called. You can perform some tasks before the system is restarted. Time spend in your routine is not counted for, so be very brief. The call runs in OS space, and global interrupts are enabled, but tick interrupts are not.

callAppBoot: Enable initialization hook that fires before any context construction.
#define callAppBoot: (cfgTrue | cfgFalse)
There may be some initialization code that is shared for all tasks. This can be put inside the the function appBoot(). This is called inside OS space, and none of the tasks are already set up at that moment. It is usually a lot more effective to collect the initialization code of the tasks that to give all tasks its own initialization code. Only put code here that only needs to be done at the very start. It is not called again if a particular task is restarted after a watchdog bark for instance.

callAppInit: Enable initialization hook that fires before context construction of each task.
#define callAppInit: (cfgTrue | cfgFalse)
It may be necessary however to individually give every task its own startup code. If so, set this parameter to cfgTrue. Note that this implies that every task must have an init method, although it may be empty. Note that it is possible to set both callMainInit and callAppInit to cfgTrue. The appBoot() is called first, followed by init methods of the tasks. In appInit code is placed that must be called before the task may start. If a task is restarted manually this is re-executed.

callAppBark: Activates the watchdog hook that fires when the watchdog barks.
#define callAppBark: (cfgTrue | cfgFalse)
When using the watchdog facility a task that gets stuck is reset. Usually there is some cleaning up to do before the loop is called again. (The init of the task is not called again!) This is done inside appBark(). The task is first re-intialized (cleanup stack and variables) and afterwards restarted (call loop). The bark section is optional however. Decide here if you want such a section. Activate cfgUseTaskWatchdog to make use of the watchdog facility.

includeTaskYield: Manual context switch
#define includeTaskYield: (cfgTrue | cfgFalse)
includes: void taskYield(void)

includeTaskDelayFromNow: Delay your task for the given number of ticks, starting from now.
#define includeTaskDelayFromNow: (cfgTrue | cfgFalse)
includes: void taskDelayFromNow(void)
Activate cfgUseDelay to make use of the this facility

includeTaskDelayFromWake: Delay your task, starting at the last waketime.
#define includeTaskDelayFromWake: (cfgTrue | cfgFalse)
includes: void taskDelayFromWake(Tuint16 uiTicksToWait)
Activate cfgUseDelay to make use of the this facility

includeGenSuspend: Suspend a task, but do not invoke a context switch.
#define includeGenSuspend: (cfgTrue | cfgFalse)
includes: void genSuspend(Tuint08 uiTaskNumber)
includes: void genSuspendOnName(Tlit TaskName)

includeTaskSuspendMe: Suspend this task and invoke a context switch.
#define includeTaskSuspendMe: (cfgTrue | cfgFalse)
includes: void taskSuspendMe(void)

includeGenResume: Resume the given task from suspension.
#define includeGenResume: (cfgTrue | cfgFalse)
includes: void genResume(Tuint08 uiTaskNumber)
includes: void genResumeOnName(Tlit TaskName)

includeTaskSleep: Put this task to sleep and invoke a context switch.
#define includeTaskSleep: (cfgTrue | cfgFalse)
includes: void taskSleep(void)
Activate cfgUseLowPowerSleep to make use of the this facility

includeTaskSleepAll: Put all tasks to sleep.
#define includeTaskSleepAll: (cfgTrue | cfgFalse)
includes: void taskSleepAll(void)
Activate cfgUseLowPowerSleep to make use of the this facility

includeTaskBlockSwitch: Block or de-block task switching.
#define includeTaskBlockSwitch: (cfgTrue | cfgFalse)
includes: void taskBlockSwitch(Tbool bBlock)

includeGenSetPriority: Set a new priority for the given task.
#define includeGenSetPriority: (cfgTrue | cfgFalse)
includes: void genSetPriority(Tuint08 uiTaskNumber, Tuint08 uiNewPriority)
includes: void genSetPriorityOnName(Tlit TaskName,Tuint08 NewPriority)

includeGenGetPriority: Return the current priority of a given task.
#define includeGenGetPriority: (cfgTrue | cfgFalse)
includes: Tuint08 genGetPriority(Tuint08 uiTaskNumber)
includes: Tuint08 genGetPriorityOnName(Tlit TaskName)

includeGenGetTickCount: Get the tick counter.
#define includeGenGetTickCount: (cfgTrue | cfgFalse)
includes: Tuint16 genGetTickCount(void)

includeGenAddtoTickCount: Add the given number of ticks to the tick counter.
#define includeGenAddtoTickCount: (cfgTrue | cfgFalse)
includes: void genAddtoTickCount(Tuint16 uiSleepTime)

includeGenGetLastWakeTime: Return the time the task was last woken.
#define includeGenGetLastWakeTime: (cfgTrue | cfgFalse)
includes: Tuint16 genGetLastWakeTime(Tuint08 uiTaskNumber)
includes: Tuint16 genGetLastWakeTimeOnName(Tlit TaskName))
Activate cfgUseDelay to make use of the this facility

includeTaskFeedWatchdog: Feed the watchdog in order to prevent barking.
#define includeTaskFeedWatchdog: (cfgTrue | cfgFalse)
includes: void taskFeedWatchdog(void)
Activate cfgUseTaskWatchdog to make use of the this facility

includeTaskKillWatchdog: Switch off the watchdog facility for this task.
#define includeTaskKillWatchdog: (cfgTrue | cfgFalse)
includes: void taskKillWatchdog(void)
Activate cfgUseTaskWatchdog to make use of the this facility

includeGenGetTaskname: Get the address from a task name
#define includeGenGetTaskname: (cfgTrue | cfgFalse)
includes: Taddress genGetTaskname(Tuint08 uiTaskNumber)
includes: Taddress genGetTasknameOnName(Tlit TaskName)
Activate cfgUseTasknames to make use of the this facility

includeTaskKillTask: Stop (in error mode) one particular task.
#define includeGenKill: (cfgTrue | cfgFalse)
includes: void taskKillTask(Tuint08 uiTaskNumber)
includes: void taskKillTaskOnName(Tlit TaskName)

includeGenReboot: Reboot the system
#define includeGenReboot: (cfgTrue | cfgFalse)
includes: void genReboot(void)

includeTaskRestart: Restart a task
#define includeTaskRestart: (cfgTrue | cfgFalse)
includes: void taskRestart(Tuint08 uiTaskNumber)
includes: void taskRestartOnName(Tlit TaskName)

includeGenLogTask: Binary oneliners about every task
#define includeGenLogTask: (cfgTrue | cfgFalse)
includes: void genLogTask(Tuint08 uiTaskNumber, void (*pipe)(Tchar))

includeGenLogOs: Binary oneliner about the os
#define includeGenLogOs: (cfgTrue | cfgFalse)
includes: void genLogOs(void (*pipe)(Tchar))

includeGenTrace: Send a byte trough the trace
#define includeGenTrace: (cfgTrue | cfgFalse)
includes: void genTrace(Tbyte bUser)

includeGenPipeInt16: Auxiliary function to push a Tint16 on a pipe
#define includeGenPipeInt16: (cfgTrue | cfgFalse)
includes: void genPipeInt16(Tuint16 uiValue, void (*pipe)(Tchar))

includeGenPassFlashString: Auxiliary function to push a string on a pipe
#define includeGenPassFlashString: (cfgTrue | cfgFalse)
includes: void genPassFlashString(Taddress pString, Tuint08 uiLength, Tchar cFilling, void (*pipe)(Tchar))

includeTaskWaitForTasks: Lock this task until N other tasks pass on the same slot.
#define includeTaskWaitForTasks: (cfgTrue | cfgFalse)
includes: Tbool taskWaitForTasks(Tuint08 uiSlot, Tuint08 uiNumberOfTasks, Tuint16 uiTicksToWait)
includes: Tbool taskWaitForTasks(Tuint08 uiSlot, Tuint08 uiNumberOfTasks)
includes: Tbool taskWaitForTasksOnName(Tlit SlotName, Tuint08 uiNumberOfTasks, Tuint16 uiTicksToWait)
includes: Tbool taskWaitForTasksOnName(Tlit SlotName, Tuint08 uiNumberOfTasks)
Activate cfgUseSynchronization to make use of the this facility

includeTaskWaitForOtherTask: Lock this task until a second task passes on the same slot.
#define includeTaskWaitForOtherTask: (cfgTrue | cfgFalse)
includes: Tbool taskWaitForOtherTask(Tuint08 uiSlot, Tuint16 uiTicksToWait)
includes: Tbool taskWaitForOtherTask(Tuint08 uiSlot)
includes: Tbool taskWaitForOtherTaskOnName(Tlit SlotName, Tuint16 uiTicksToWait)
includes: Tbool taskWaitForOtherTasknName(Tlit SlotName)
Activate cfgUseSynchronization to make use of the this facility

includeGenWaitRelease: Release all wait locks on this slot.
#define includeGenWaitRelease: (cfgTrue | cfgFalse)
includes: void genWaitRelease(Tuint08 uiSlot)
includes: void genWaitReleaseOnName(Tlit SlotName)
Activate cfgUseSynchronization to make use of the this facility

includeTaskMutex: Try to obtain or release a mutex on the given slot.
#define includeTaskMutex: (cfgTrue | cfgFalse)
includes: Tbool taskSyncRequest(Tuint08 uiSlotSlot, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncRequest(Tuint08 uiSlotSlot, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncRequest(Tuint08 uiSlotSlot, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling)
includes: Tbool taskSyncRequest(Tuint08 uiSlotSlot, Tsint08 siFreeRightFilling)
includes: void taskSyncRelease(Tuint08 uiSlotSlot)
includes: Tbool taskSyncWriteWriteRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncWriteWriteRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling)
includes: Tbool taskSyncWriteReadRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncWriteReadRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling)
includes: Tbool taskSyncReadWriteRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncReadWriteRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling)
includes: Tbool taskSyncReadReadRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncReadReadRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling)
includes: Tbool taskMutexRequestOnName(Tlit SlotName, Tuint16 uiTicksToWait)
includes: Tbool taskMutexRequestOnName(Tlit SlotName)
includes: void taskSyncReleaseOnName(Tlit SlotLeftName, Tlit SlotRightName)
includes: void taskMutexReleaseOnName(Tlit SlotName)
Call taskMutexRequest() and taskMutexRelease() Activate cfgUseSynchronization to make use of the this facility

includeTaskQueu: Try to obtain or release a lock on a queu for n bytes.
#define includeTaskQueu: (cfgTrue | cfgFalse)
includes: Tbool taskSyncRequest(Tuint08 uiSlotSlot, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncRequest(Tuint08 uiSlotSlot, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncRequest(Tuint08 uiSlotSlot, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling)
includes: Tbool taskSyncRequest(Tuint08 uiSlotSlot, Tsint08 siFreeRightFilling)
includes: void taskSyncRelease(Tuint08 uiSlotSlot)
includes: Tbool taskSyncWriteWriteRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncWriteWriteRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling)
includes: Tbool taskSyncWriteReadRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncWriteReadRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling)
includes: Tbool taskSyncReadWriteRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncReadWriteRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling)
includes: Tbool taskSyncReadReadRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling, Tuint16 uiTicksToWait)
includes: Tbool taskSyncReadReadRequestOnName(Tlit SlotLeftName, Tlit SlotRightName, Tsint08 siFreeLeftFilling, Tsint08 siFreeRightFilling)
includes: Tbool taskQueuWriteRequestOnName(Tlit SlotName, Tsint08 siFreeFilling, Tuint16 uiTicksToWait)
includes: Tbool taskQueuWriteRequestOnName(Tlit SlotName, Tsint08 siFreeFilling)
includes: Tbool taskQueuReadRequestOnName(Tlit SlotName, Tsint08 siFreeFilling, Tuint16 uiTicksToWait)
includes: Tbool taskQueuReadRequestOnName(Tlit SlotName, Tsint08 siFreeFilling)
includes: void taskSyncReleaseOnName(Tlit SlotLeftName, Tlit SlotRightName)
includes: void taskQueuReleaseOnName(Tlit SlotName)
Call taskQueuRequest() and taskQueuRelease() Activate cfgUseSynchronization to make use of the this facility

includeGenQueuWrite: Write a byte on the queu.
#define includeGenQueuWrite: (cfgTrue | cfgFalse)
includes: void genQueuWrite(Tuint08 uiSlot, Tbyte bItem)
includes: void genQueuWriteOnName(Tlit SlotName, Tbyte bItem)
Activate cfgUseSynchronization, and have cfgUseAsQueu defined on at least one task to make use of the this facility.

includeGenQueuRead: Read a byte from the queu.
#define includeGenQueuRead: (cfgTrue | cfgFalse)
includes: Tbyte genQueuRead(Tuint08 uiSlot)
includes: Tbyte genQueuReadOnName(Tlit SlotName)
Activate cfgUseSynchronization, and have cfgUseAsQueu defined on at least one task to make use of the this facility.

includeGenQueuClear: Clear the queu.
#define includeGenQueuClear: (cfgTrue | cfgFalse)
includes: void genQueuClear(Tuint08 uiSlot)
includes: void genQueuClearOnName(Tlit SlotName)
Activate cfgUseSynchronization, and have cfgUseAsQueu defined on at least one task to make use of the this facility.

includeGenQueuPeek: Look ahead what the next byte to read would be.
#define includeGenQueuPeek: (cfgTrue | cfgFalse)
includes: Tbyte genQueuPeek(Tuint08 uiSlot)
includes: Tbyte genQueuPeekOnName(Tlit SlotName)
Activate cfgUseSynchronization, and have cfgUseAsQueu defined on at least one task to make use of the this facility.

includeGenQueuReadable: See how many bytes can be read from the queu.
#define includeGenQueuReadable: (cfgTrue | cfgFalse)
includes: Tuint08 genQueuReadable(Tuint08 uiSlot)
includes: Tuint08 genQueuReadableOnName(Tlit SlotName)
Activate cfgUseSynchronization, and have cfgUseAsQueu defined on at least one task to make use of the this facility.

includeGenQueuWriteable: See how many bytes can be written to the queu.
#define includeGenQueuWriteable: (cfgTrue | cfgFalse)
includes: Tuint08 genQueuWriteable(Tuint08 uiSlot)
includes: Tuint08 genQueuWriteableOnName(Tlit SlotName)
Activate cfgUseSynchronization, and have cfgUseAsQueu defined on at least one task to make use of the this facility.

includeGenQueuFull: See if the queu is full.
#define includeGenQueuFull: (cfgTrue | cfgFalse)
includes: Tbool genQueuFull(Tuint08 uiSlot)
includes: Tbool genQueuFullOnName(Tlit SlotName)
Activate cfgUseSynchronization, and have cfgUseAsQueu defined on at least one task to make use of the this facility.

includeGenQueuEmpty: See if the queu is empty.
#define includeGenQueuEmpty: (cfgTrue | cfgFalse)
includes: Tbool genQueuEmpty(Tuint08 uiSlot)
includes: Tbool genQueuEmptyOnName(Tlit SlotName)
Activate cfgUseSynchronization, and have cfgUseAsQueu defined on at least one task to make use of the this facility.

includeTaskSwitchGlobalInterrupts: Enable/disable global interrupts.
#define includeTaskSwitchGlobalInterrupts: (cfgTrue | cfgFalse)
includes: taskEnableGlobalInterrupts()
includes: taskDisableGlobalInterrupts()
Enable (with taskEnableGlobalInterrupts()) or disable (with taskDisableGlobalInterrupts()) global interrupts, and keep track of the interupt state over a context switch.

includeTaskSwitchTickInterrupts: Enable/disable tick interrupts.
#define includeTaskSwitchTickInterrupts: (cfgTrue | cfgFalse)
includes: taskEnableTickInterrupts()
includes: taskDisableTickInterrupts()
Enable (with taskEnableTickInterrupts()) or disable (with taskDisableTickInterrupts()) tick interrupts, and keep track of the interupt state over a context switch.

includeTaskProtectGlobalCritical: Disable/enable global interrupts, keep track of the level depth.
#define includeTaskProtectGlobalCritical: (cfgTrue | cfgFalse)
includes: void taskEnterGlobalCritical(void)
includes: void taskExitGlobalCritical(void)
Call taskEnterGlobalCritical() and taskExitGlobalCritical() Activate cfgUseNestedCriticals to make use of the this facility.

includeTaskProtectTickCritical: Disable/disable tick interrupts, keep track of the level depth.
#define includeTaskProtectTickCritical: (cfgTrue | cfgFalse)
includes: void taskEnterTickCritical(void)
includes: void taskExitTickCritical(void)
Call taskEnterTickCritical() and taskExitTickCritical()
     Activate cfgUseNestedCriticals to make use of the this facility.

includeIsrEnter: Start the isr by a context switch.
#define includeIsrEnter: (cfgTrue | cfgFalse)
includes: isrEnter()
includes: INCLUDES
Activate cfgIntNonEmpty to make use of the this facility.

includeIsrExit: End the isr, switch to the OS.
#define includeIsrExit: (cfgTrue | cfgFalse)
includes: isrExit()
Activate cfgIntNonEmpty to make use of the this facility.

includeIsrBegin: Start the isr, switch to the isr stack.
#define includeIsrBegin: (cfgTrue | cfgFalse)
includes: isrBegin()
Activate cfgIntNonEmpty to make use of the this facility.

includeIsrEndReturn: Stop the isr, return to the place where the interrupt occurred.
#define includeIsrEndReturn: (cfgTrue | cfgFalse)
includes: isrEndReturn()
Activate cfgIntNonEmpty to make use of the this facility.

includeIsrEndYield: Stop the isr, yield as quickly as possible.
#define includeIsrEndYield: (cfgTrue | cfgFalse)
includes: isrEndYield()
Activate cfgIntNonEmpty to make use of the this facility.

includeIsrStartLoad: Start the stopwatch measuring time inside an unmanaged isr
#define includeIsrStartLoad: (cfgTrue | cfgFalse)
includes: void isrStartLoad(void)
Activate cfgIntNonEmpty, cfgIntOsProtected and includeTaskYield to make use of the this facility. If you do not activate cfgUseLoadMonitor the method is replaced by an empty call.

includeIsrStopLoad: Stop the stopwatch measuring time inside an unmanaged isr
#define includeIsrStopLoad: (cfgTrue | cfgFalse)
includes: void isrStopLoad(void)
Activate cfgIntNonEmpty to make use of the this facility. If you do not activate cfgUseLoadMonitor the method is replaced by an empty call.

includeTaskStackCheck: Call to check how much free space is left on the task stack.
#define includeTaskStackCheck: (cfgTrue | cfgFalse)
includes: Tuint08 isrStackCheck(Tuint08 uiExtraStackSafety)

includeIsrStackCheck: Call to check how much free space is left on the isr stack.
#define includeIsrStackCheck: (cfgTrue | cfgFalse)
includes: Tuint08 taskStackCheck(Tuint08 uiExtraStackSafety)
Depending on the settings of cfgCheckIsrStack, cfgCheckWatermarks and cfgIntSwitchUsesOSstack the call be be replaced by an empty call.

includeTaskWaitForEvents: Lock this task until the required event is fired.
#define includeTaskWaitForEvents: (cfgTrue | cfgFalse)
includes: Tbool taskWaitForEvent(Tuint08 uiEvent, Tuint16 uiTicksToWait)
includes: Tbool taskWaitForEvent(Tuint08 uiEvent)
includes: Tbool taskWaitForEventOnName(Tlit EventName,TicksToWait)
includes: Tbool taskWaitForEventOnName(Tlit EventName)
Activate cfgUseEvents to make use of the this facility

includeGenFireAllEvents: Release all tasks waiting on events.
#define includeGenFireAllEvents: (cfgTrue | cfgFalse)
includes: void genFireAllEvents(void)
Activate cfgUseEvents to make use of the this facility

includeTaskFileAccess: Open and close a file.
#define includeTaskFileAccess: (cfgTrue | cfgFalse)
includes: Tbool taskFileOpen(Tbool bReadOnly, Tuint16 uiTicksToWait)
includes: Tbool taskFileOpen(Tuint16 uiTicksToWait)
includes: Tbool taskFileOpen(Tbool bReadOnly)
includes: Tbool taskFileOpen(void)
includes: void taskFileClose(void)
includes: Tbyte taskFileDirectRead(Taddress pAddress)
includes: void taskFileDirectWrite(Taddress pAddress, Tbyte bValue)
Call taskFileOpen() and taskFileClsoe(), and taskFileDirectRead() and taskFileDirectWrite() for unmanged raw access to the file system. Activate cfgUseFileSystem to make use of the this facility

includeTaskFileFormat: Clear the whole filespace (formats the FAT too).
#define includeTaskFileFormat: (cfgTrue | cfgFalse)
includes: void taskFileFormat(void)
Activate cfgUseFileSystem to make use of the this facility

includeTaskFileGetSize: Get the size of a file.
#define includeTaskFileGetSize: (cfgTrue | cfgFalse)
includes: Tuint08 taskFileGetSize(Tuint08 uiFileNumber)
includes: Tuint08 taskFileGetSizeOnName(Tlit FileName)
Activate cfgUseFileSystem to make use of the this facility

includeTaskFileSetSize: Set the size of a file.
#define includeTaskFileSetSize: (cfgTrue | cfgFalse)
includes: void taskFileSetSize(Tuint08 uiFileNumber, Tuint08 uiSize)
includes: void taskFileSetSizeOnName(Tlit FileName, Tuint08 uiSize)
includes: void taskFileClear(Tuint08 uiFileNumber)
includes: void taskFileClearOnName(Tlit FileName)
Activate cfgUseFileSystem to make use of the this facility Activate cfgUseFileSystemMaintainFAT to make use of the this facility

includeTaskFileReadByte: Read a raw byte from a file
#define includeTaskFileReadByte: (cfgTrue | cfgFalse)
includes: Tbyte taskFileReadByte(Tuint08 uiFileNumber, Tuint08 uiOffset)
includes: Tbyte taskFileReadByteOnName(Tlit FileName, Tuint08 uiOffset)
Activate cfgUseFileSystem to make use of the this facility Activate cfgUseFileSystemMaintainFAT to make use of the this facility

includeTaskFileWriteByte: Write a raw byte to a file
#define includeTaskFileWriteByte: (cfgTrue | cfgFalse)
includes: