Introduction
Below, find an overview of the error messages you may receive. This list is only valid for version 0.89 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 two parts,
with the following format:
10xx xxxx
: The first part of the message, the xx.xxxx
forms an errorcode that can be looked up below.
01xx xxxx
: Repetition of the first part, just to get your attention.
iiii iiii
: Second part the message, can be a tasknumber, slotnumber or something else, see below.
An example how that might look like can be seen to the right. It displays the messages 0x04
followed by 0x71
This is the error message for an illegal register use. The highest nibble of the information
byte tells this was task 1, the lowest nibble tells you the misuse was conducted by one of the registers r28,
r29, r30 or r31. (see help below)
Detailed descriptions
0x01 | errTaskStackUnderMinimum: Stack size under the absolute minimum. |
Stack size must be at least 4 bytes, or 6 in case of three byte addresses.
The size of the stack is under that minimum value.
The task cannot be started. The lowest nibble of the info byte displays the task number.
Increase the tasksize.
|
0x02 | errTaskStackSetupTooSmall: Stack size is under the minimum required to save the context |
Femto OS can calculate the minimum stack requirement for each task.
The size of the stack is under the minimum required to save the context
The task cannot be started. The lowest nibble of the info byte displays the task number.
Increase the tasksize.
|
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 |
Review your code, there is flaw in the logic.
|
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 | errTaskPriorityToHigh: 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?
|
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: Incompatible request for this file state. |
Trying to open a file that is already open, to write in read-only mode, to read,
write or close a file that is not open. Or you tried to put a task to sleep
with a open file in write mode.
The lowest nibble of the info byte displays the task number.
Open (or 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 | 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
|
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.
|
0x29 | fatSlotStackOverflow: A function tried to store a lock while the slot stack was full |
A function tried to store a lock while the slot stack was full.
This error will be removed.
|
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.
|