Home News Features Examples Code FAQ License
AVR Webring
Prev Hub Join Rate Next
Error List
0.92 0.91 0.89 0.88 0.87

Introduction

Below, find an overview of the error messages you may receive. This list is only valid for version 0.92 of Femto OS. Please select the correct version first, for names, codes and descriptions made be significantly different between the versions.

Errors are divided into two categories, fatal and non fatal errors. Production code should of course generate no error at all, but in testing situations, the non fatal errors try to stop the offending task, and continue (but do not release any locks the task was holding). Note this is only possible if the stacks are not damaged, after the error has been reported. Normally a SaveContext will not corrupt the task stack is the context does not fit (it will skip the save in test mode) but reporting the error itself takes quite some stack space and can also corrupt a stack. Fatal errors are reported indefinitely. There is the option cfgCheckAlwaysFatal to make all errors fatal. The error message consists off three times 8 bit displayed on the leds, holding three parts, with the following format:

An example how that might look like can be seen to the right. It displays the messages 0x0E followed by 0x35 and 0x08. This is the error code for setting the priority too high. The call code is 0x35, refering to the genSetPriority call. The most significant nibble of the information code contains nothing in this case and the least significant nibble tells you the misuse was conducted in task number 8.

Standard Errors
0x01 errInsufficientCapabilities Task does not allow this operation.
0x03 errTaskStackWillOverflow The stack of the task will become too small during execution.
0x04 errTaskIllegalRegisterUse A register is being used which is not saved on the context.
0x05 errTaskTakesTooLong Long task, sub tick overflow may occur, leading to missed ticks.
0x06 errTaskNestingOverflowed Task cannot enter a critical section
0x07 errTaskNestingUnderflowed Task cannot exit a critical section
0x08 errTaskNestingPresent This call is illegal in nested critical sections
0x0A errTaskHoldsNoSlots Task cannot make use of slot when non was configured.
0x0B errSlotDoubleUsed Double slots cannot be used for this task.
0x0C errQueuOverrun Writing data to a full queue was forbidden.
0x0D errQueuUnderrun Reading data from an empty queue was forbidden.
0x0E errTaskPriorityTooHigh Tried to set the priority to a value above 7.
0x0F errTaskDelayTooLong Delay equals of exceeds 0xFF00 ticks.
0x10 errTaskDelayTooShort System cannot handle 'negative' delays.
0x11 errSlotZeroUsed Slot with number zero is being used, this is forbidden.
0x12 errSlotTypeMismatch Slot used outside its definition.
0x13 errSlotTwins Two identical slot numbers cannot be used for locking
0x14 errIllegalDominantState Task may not block or restart when in dominant state.
0x15 errQueuWriteLimit Request to write more data than space available
0x16 errQueuReadLimit Request to read more data than space available
0x17 errSlotDecreaseFail Trying to remove a slot not present on the slot stack.
0x18 errSlotIncreaseFail Trying to put more slots on the stack than room for.
0x19 errFileOpenMode File is open when it is not expected or allowed
0x1A errFileInvalidFileNumber Trying operations on a file which does not exist.
0x1B errFileOutOfRange Trying to read or write outside the file.
0x1C errFileClosedMode File is closed when it is not expected or allowed
0x1D errFileWrongMode File is in the wrong mode for the requested operation
0x1E errInvalidRestartMode Restart may only be called with a valid mode,
0x1F errInvalidSuspendMode Suspend may only be called with a valid mode,

Fatal Errors
0x20 fatInternalError Error of the OS, please report.
0x21 fatOsStackUnderMinimum The stack of the OS is under the required minimum.
0x22 fatOsStackOverflowed Overflow of the OS Stack
0x23 fatIllegalEvent An illegal event has been fired.
0x24 fatTaskStackOverflowed The stack of the task became too small during execution.
0x25 fatIsrStackOverflowed The stack of the isr became too small during execution.
0x26 fatOsTickRateTooHigh Ticks come at to short intervals.
0x27 fatTaskSubtickOverflow The sub tick timer overflowed.
0x28 fatTaskIllegalTaskNumber A function call used a non existent task number.
0x2A fatIllegalCallfromISR No generic functions from isr without OS interrupt protection.

Detailed descriptions

0x01 errInsufficientCapabilities: Task does not allow this operation.
Each task is defined only with a particular set of capabilities, unless you defined to have all capabilities for all tasks. You tried to perform an operation in a task which does not have sufficient capabilities to act. The lowest nibble of the info byte displays the task number. The highest nibble represents the failing capability.
  • 0001 cfgCapWatchdog
  • 0010 cfgCapEvent
  • 0011 cfgCapCritical
  • 0100 cfgCapSynchronization
  • 0101 cfgCapFileSystem
  • 0110 cfgCapDelay
  • 0111 cfgCapTimeout

0x03 errTaskStackWillOverflow: The stack of the task will become too small during execution.
Femto OS calculated it will not be possible to save the context on the particular moment it tried to do so. That stack probably has not yet really overflowed, but the task cannot be restarted. Other tasks should be fine. The lowest nibble of the info byte displays the task number.
     Increase the tasksize.

0x04 errTaskIllegalRegisterUse: A register is being used which is not saved on the context.
Registers that are not saved on the context have altered during execution of the task. This might be an incorrect error. Femto OS cannot determine with 100% certainty that a modified register is actually used, it assumes it is. If you are absolutely certain the register is not used, exclude it from the register check.
     The lowest nibble of the info byte displays the task number. The highest nibble is used to report the highest register block in violation. One (or more) of the registers is offending. The numbering is like this:
  • 0000: r0 r1 r2 r3
  • 0001: r4 r5 r6 r7
  • 0010: r8 r9 r10 r11
  • 0011: r12 r13 r14 r15
  • 0100: r16 r17 r18 r19
  • 0101: r20 r21 r22 r23
  • 0110: r24 r25 r26 r27
  • 0111: r28 r29 r30 r31
Add registers to the context save, or, if the register is not used in interruptible area's, exclude the register block from verification.

0x05 errTaskTakesTooLong: Long task, sub tick overflow may occur, leading to missed ticks.
The tick counter is driven by a sub tick counter. The sub tick counter keeps running, even if no tick can be generated. However the sub tick counter itself may not overflow for that may lead to missed ticks. The lowest nibble of the info byte displays the task number.
     Reduce the time slice for that particular task, or adjust the timing of the system to a lower tick frequency.

0x06 errTaskNestingOverflowed: Task cannot enter a critical section
Overflow of the number of nesting levels of one of the critical sections. The number is a power of two minus one depending on the number of bits reserved for the counting. Counting is per type, being one of global, switch or tick. The lowest nibble of the info byte displays the task number.
     Reduce the levels of nesting, or increase the level counter.

0x07 errTaskNestingUnderflowed: Task cannot exit a critical section
Underflow of the number of nesting levels of one of the critical sections. You tried to exit a critical section while not inside one. Counting is per type, being one of global, switch or tick. The lowest nibble of the info byte displays the task number.
     Review your code, there is flaw in the logic.

0x08 errTaskNestingPresent: This call is illegal in nested critical sections
You cannot make certain calls when within nested critical sections. For example, all critical sections must have been left when calling taskRestart()

0x0A errTaskHoldsNoSlots: Task cannot make use of slot when non was configured.
Trying to call an synchronization primitive on a task that was not configured not to hold any slots (Slotsize == 0). This is an error. Define your task to with SlotSize_task to make use of one or more slots. The lowest nibble of the info byte displays the task number.

0x0B errSlotDoubleUsed: Double slots cannot be used for this task.
On waits double slots are never allowed. The same applies for mutexes and queu's if cfgSyncDoubleBlock is not activated. This generates this error. The lowest nibble of the info byte displays the task number.
     Adjust the slot use to include double slots, or change the logic or your code.

0x0C errQueuOverrun: Writing data to a full queue was forbidden.
Trying to write data on an already full queue. This is not an error in strict sense, since bytes put on a full queue are simply ignored. However, you asked to be noted when this situation occurs. This error occurred inside a task (not an isr). The lowest nibble of the info byte displays the task number, this highest the slot number.
     Review the logic of your code

0x0D errQueuUnderrun: Reading data from an empty queue was forbidden.
Trying to read data from an already empty queue. This is not an error in strict sense, since bytes put on a full queu are simply ignored. However, you asked to be noted when this situation occurs. This error occurred inside a task (not an isr). The lowest nibble of the info byte displays the task number, this highest the slot number.
     Review the logic of your code

0x0E errTaskPriorityTooHigh: Tried to set the priority to a value above 7.
There are only eight priority levels in the Femto OS. You tried to use a higher priority (this also occurs at the use of a negative priority). The lowest nibble of the info byte displays the task number.
     Review the parameter of the function call.

0x0F errTaskDelayTooLong: Delay equals of exceeds 0xFF00 ticks.
The delay may not be any longer as 0xFEFF, directly or in internal calculation. Internally a to high delay time arose. The lowest nibble of the info byte displays the task number. This also might be the consequence of a faulty reconstruction of the tick counter after sleeping. The lowest nibble of the info byte displays the task number.
     Lower the delay or timeout value you used in the call.

0x10 errTaskDelayTooShort: System cannot handle 'negative' delays.
In a delayFromWake the task is not de-activated, because the wake time lies before the current time. This means this particular is running beyond the required reactivation moment. There was no time to put the task into a delay. Actually this is a dangerous situation, if it continues a little longer, the task may get into a very extensive delay. The lowest nibble of the info byte displays the task number.
     Increase the delayFromWake time, or, reduce the execution time of the code.

0x11 errSlotZeroUsed: Slot with number zero is being used, this is forbidden.
Slot with number zero is used for internal purposes and cannot be used by the application developer. The lowest nibble of the info byte displays the task number.
     Use a valid slot.

0x12 errSlotTypeMismatch: Slot used outside its definition.
Slot type mismatch, a function tried to use a slot for an other purpose as it was defined. Mutexes for example cannot be used as queues. The lowest nibble of the info byte displays the task number.

0x13 errSlotTwins: Two identical slot numbers cannot be used for locking
Twin slots. You cannot ask a double lock on two identical slot numbers. The lowest nibble of the info byte displays the task number.
     Use a single lock, or choose two different slot numbers. Cut/Paste error?

0x14 errIllegalDominantState: Task may not block or restart when in dominant state.
Calling a method that may block, such as mutex, wait or a the opening of a file with a task that is dominant may lead to a permanent system deadlock. Therefore this is prohibited. Also, when restarting a task, it may not be dominant, for it's state cannot be retained. Also, you may not handle suspend requests in the dominant mode.

0x15 errQueuWriteLimit: Request to write more data than space available
Your are trying to write more data to a queue than the size of that queue. This call can never succeed and is therefore an error, the call would block indefinitely. The lowest nibble of the info byte displays the task number.
     Reduce the size of the request.

0x16 errQueuReadLimit: Request to read more data than space available
Your are trying to read more data from a queue than the size of that queue. This call can never succeed and is therefore an error, the call would block indefinitely. The lowest nibble of the info byte displays the task number.
     Reduce the size of the request.

0x17 errSlotDecreaseFail: Trying to remove a slot not present on the slot stack.
This error may arise if you relinquish more slots than where claimed. Locking and releasing must always be balanced. The lowest nibble of the info byte displays the task number, this highest the slot number.
     Review the logic of the code.

0x18 errSlotIncreaseFail: Trying to put more slots on the stack than room for.
The slot stack, that is, the memory where the reserved slots are kept for each task is limited and has been exceeded. The lowest nibble of the info byte displays the task number, this highest the slot number.
     Increase the SlotSize_task parameter for your task.

0x19 errFileOpenMode: File is open when it is not expected or allowed
The call you made tried to open a file that is already open, or is not allowed to be made when a file is open. The lowest nibble of the info byte displays the task number.
     Close the file prior to your call.

0x1A errFileInvalidFileNumber: Trying operations on a file which does not exist.
The file you tried to use does not exist as dedicated (named) file and not as default file. The lowest nibble of the info byte displays the task number.
     Adjust the file number to a valid file, or increase the number of files.

0x1B errFileOutOfRange: Trying to read or write outside the file.
Operations for a particular file number are only allowed inside the EEPROM space reserved for that file. You tried to read or write outside the file. The lowest nibble of the info byte displays the task number.
     Reduce the read/write data size.

0x1C errFileClosedMode: File is closed when it is not expected or allowed
The call you made tried to close a file that is already closed, or is not allowed to be made when a file is closed. The lowest nibble of the info byte displays the task number.
     Open the file prior to your call.

0x1D errFileWrongMode: File is in the wrong mode for the requested operation
The call you made expected to be the file in the read mode, when is was in write, or vice versa. Or, the call is not allowed in specific circumstances, for example with a file open in write mode. The lowest nibble of the info byte displays the task number.
     Bring the file in the correct mode prior to your call.

0x1E errInvalidRestartMode: Restart may only be called with a valid mode,
Only four modes can be used to call restart. These are: defRestartRunning, defRestartSuspended, defRestartSleeping or defRestartDefault. Other values can give bizarre results.

0x1F errInvalidSuspendMode: Suspend may only be called with a valid mode,
Only three modes can be used to call suspend. These are: defSuspendNow, defSuspendCheck or defSuspendClear. Other values can give bizarre results.

0x20 fatInternalError: Error of the OS, please report.
This error should never occur, and signals a flaw in the OS. If possible, please report the circumstances which led to this situation.

0x21 fatOsStackUnderMinimum: The stack of the OS is under the required minimum.
The stack of the OS is under the required minimum. It may not be lower as the space taken by the background variables. The information byte is unused.
     Increase the StackSizeOS

0x22 fatOsStackOverflowed: Overflow of the OS Stack
During use the size of the OS stack became to small, other data may be overwritten.The information byte is unused. Note that the OS needs more stack space if checks are switched on.
     Increase the StackSizeOS

0x23 fatIllegalEvent: An illegal event has been fired.
You tried to fire an event that is located on the auxiliary bit of the Femto OS. Usually this is the event with the highest number. The lowest nibble of the info byte displays the task number.
     Use an other event, or separate the event register from the auxiliary bit

0x24 fatTaskStackOverflowed: The stack of the task became too small during execution.
The stack of the task was not large enough to accommodate the variables and/or the context. Since the task can not reliably be stopped, this error is fatal The lowest nibble of the info byte displays the task number.
     Increase the stack size of this task.

0x25 fatIsrStackOverflowed: The stack of the isr became too small during execution.
The stack of the isr was not large enough to accommodate the variables of the isr. Since the isr cannot be stopped, this error is fatal The information byte is unused.
     Increase the stack of the isr.

0x26 fatOsTickRateTooHigh: Ticks come at to short intervals.
The OS takes more then 50% of the processor time regularly. In the equidistant timing model the system is at risk of immediate timer interrupts after context switch. Note that incidental high loads should not be a problem, for instance if a watchdog barks, or at heavy interrupt load. The information byte is unused.
     Reduce the tick frequency or increase the clock frequency.

0x27 fatTaskSubtickOverflow: The sub tick timer overflowed.
A task is too long, or the OS took to long in the variable timing model, so that it may overflow the sub tick timer. This may lead to missed ticks. The lowest nibble of the info byte displays the task number.
     Increase the time a sub tick takes, thereby lowering the tick frequency.

0x28 fatTaskIllegalTaskNumber: A function call used a non existent task number.
You may only use valid task numbers. If you make use of task names only, there is no the risk of using undefined task numbers. The lowest nibble of the info byte displays the task number (of the running task, not of the call!)
     Check the calls, use task names.

0x2A fatIllegalCallfromISR: No generic functions from isr without OS interrupt protection.
A 'genXXXX' function was used from an isr while cfgIntOsProtected was not set. This is forbidden, and may lead to rare and hard to trace weird bugs.
     Remove the call, or switch on OS protection (cfgIntOsProtected).

Contact: info@femtoos.org   CC-BY License: Ruud Vlaming.