CR16C, IAR
embOS for National Semiconductor CR16C was developed for and with IAR's compiler and supports nearly all memory models offered by this compiler. It comes with an easy to use start project for IAR's embedded workbench. Software development with WinIdea debugger is supported.
Resources and performance data
| Memory usage | |
|---|---|
| Kernel size (ROM) | < 1800 bytes |
| Kernel RAM usage | 40 bytes |
| RAM usage per task control block | 28 bytes |
| RAM usage per resource semaphore | 14 bytes |
| RAM usage per counting semaphore | 6 bytes |
| RAM usage per mailbox | 16 bytes |
| RAM usage per software timer | 14 bytes |
| RAM usage event | 0 bytes |
| Min. stack-size per task (RAM) | 28 bytes |
| Timing | |
| Context switch time | tbd |
| Interrupt latency time | tbd |
| Kernel CPU usage/TICK | less than .4% of total calculation time at 1000 Interrupts/second (1ms TICK) |
| Basic time unit (TICK) | typ. 1 ms, min. 20 µs (50 kHz interrupt frequency) |
| Features | |
| Max. no. of tasks | Unlimited (by available RAM only) |
| Max. no. of mailboxes | unlimited (by available RAM only) |
| Max. no. of semaphores (resource/binary/counting) | unlimited (by available RAM only) |
| Max. no. of software timers | unlimited (by available RAM only) |
| Max. no. of priorities | 255 |
| Stack size idle task (RAM) | 0 (no memory needed) |
| Nested interrupts | permitted |
| Task switches from within ISR | possible |
Absolute timings given above were measured with embOS release build
embOSView offers system analysis during runtime

Additional information
IAR Web site for additional compiler info / support
Release notes
- Tool chain used for build
- New features
- Improvements
- Program corrections
- Known problems/limitations
- Release history
- Miscellaneous
Tool chain used for build
The following tools have been used:
Compiler: IAR ICCCR16C V2.11a Assembler: IAR ACR16C V2.11a Librarian: IAR XAR V1.03L Workbench: IAR IARIDE V4.6B
New features
Version 3.32m
- OS_TimerEx, Extended timer implemented
Extended timers are software timers which call a user defined callback function when the timer expires.
In comparison to normal embOS timers, a parameter is passed to the timer callback function.
The parameter value is initialized during timer creation.
Version 3.32l
- OS_EnterIntStack() and OS_LeaveIntStack are implemented to safe space on task stack.
Version 3.32j
- First version. None.
Improvements
Version 3.32o
- Automatic call of OS_INIT_SYS_LOCKS() removed.
During initialization of embOS, OS_INIT_SYS_LOCK() is not called automatically.
As most of the applications do not need thread safe system libraries, an automatic activation of syslocks causes unwanted overhead.
If supported and required, the user may call OS_INIT_SYS_LOCKS() from his own application after normal initialization of embOS.
Program corrections
Version 3.32o
- OS_Unuse() corrected
OS_Unuse() must not be called from a task that does not claim the resource semaphore.
According to the documentation, the debug build of embOS should generate a call to OS_Error() if this fault happens.
All previous versions of embOS did not call OS_Error(). Now, OS_Error() will be called in that situation with error code 156: OS_ERR_RESOURCE_OWNER(). - Enter-/LeaveIntStack corrected
A word access to a byte variable caused errors
Version 3.32l1
- Stack switch corrected
Interrupts must be disabled while counter for default stack is changed and stackpointer is set to default stack.
Version 3.32l
- OS_EVENT_Delete() corrected
OS_EVENT_Delete() did not work correctly. OS_LeaveRegion() was called inside the function without calling OS_EnterRegion() bfore.
In debug builds of embOS, the error handler OS_Error() was called with error 151 (OS_ERR_LEAVEREGION_BEFORE_ENTERREGION).
In release builds the system was blocked because the underflow of region count inhibts all further task switches, or system crashes, because incrementing the region count the next time allows task switches instead of blocking them. The problem existed in all previous versions and is fixed with version 3.32l. - Round-robin task switching corrected.
Round robin task switching did not work correctly in previous version. A task which was blocked for some reason could be activated. The system crashed during task switch.
The problem existed since version 3.32j and is fixed with version 3.32l.
Version 3.32k
- Handler function _OS_OnTx() for serial communication to embOSView corrected.
The transmission handler for communication with embOSView might have sent incorrect data to embOSView, because internal control state was updated after sending the data.
The problem occured on a new embOS port for a specific CPU only and is fixed with version 3.32k.
Version 3.32j
- None.
Known problems/limitations
Version 3.32j
- None.
Release history
| Version | Release date | Short explanation |
| V3.32o | 30. Apr 2007 | OS_Unuse() error handling improved. Enter-/LeaveIntStack corrected. |
| V3.32l1 | 02. Apr 2007 | Stack switch corrected. |
| V3.32l | 28. Mar 2007 | Round robin switching corrected. |
| V3.32j | 01. Mar 2007 | First version with release history |
Miscellaneous
This document was first released with version 3.32j of the software.
Software released earlier is documented internally. This information is available at request.
CR16C, IAR
