M16C/R8C, Tasking
embOS for Renesas M16C6x / M16C20 / R8C was developed for and with Tasking compiler and supports all memory models offered by this compiler. It comes with easy to use start projects for Tasking's EDE. Software development with Crossview Pro and Crossview Pro simulator simulator is supported.
Resources and performance data
| Memory usage | |
|---|---|
| Kernel size (ROM) | 1680 bytes |
| Kernel RAM usage | 29 bytes |
| RAM usage per task control block | 17 bytes |
| RAM usage per resource semaphore | 4 bytes |
| RAM usage per counting semaphore | 2 bytes |
| RAM usage per mailbox | 11 bytes |
| RAM usage per software timer | 11 bytes |
| RAM usage event | 0 bytes |
| Min. stack-size per task (RAM) | 40 bytes |
| Timing | |
| Context switch time | 342 clock cycles (21.3 µs), independent of number of tasks |
| Interrupt latency time | max. 158 clock cycles (9.9 µs) |
| 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 on an M30624 CPU running at 16MHz in SMALL memory model.
embOSView offers system analysis during runtime

Available Emulators
- Renesas
- HP
Additional information
Tasking Web site for additional compiler info / support
Renesas Web site for additional CPU info / support
Release notes
Updated: 2004-07-16 [AW]
Updated: 2003-06-27 [AW]
- Tool chain used for build
- New features
- Improvements
- Program corrections
- Known problems
- Release history
- Miscellaneous
Tool chain used for build
The following tools have been used:
TASKING Toolchain 3.0r1
Compiler: TASKING CM16C v3.0r1
Assembler: TASKING ASM16C v3.0r1
Librarian: TASKING ARM16C v3.0r1
Workbench: TASKING EDE v3.0
New features
Version 3.20
- OS_Suspend() / OS_Resume() implemented
New functions to suspend and resume tasks unconditionally. - Fixed size memory blocks implemeted
New functions to allocate fixed size memory blocks from embOS. - Dynamic memory allocation supported by embOS
Thread safe dynamic memory allocation functions implemented.
Version 3.10k
- OS_GetMailTimed()
New mailbox retreiving function with timeout.
Version 3.10d
- OS_GetpCurrentTimer()
New info routine. May be used in timer callback routines to examine which timer expired. - OS_GetpCurrentTask()
New info routine. May be used to examine current running task.
Version 3.10
- Data format for communication with embOSView modified
For terminal I/O in embOSView, the data format was changed. Therefore embOSView V3.10 or later is required. - OS_WaitSingleEvent()
Unmasked events remain unchanged when function returns. - OS_WaitSingleEventTimed()
Unmasked events remain unchanged when function returns. Timeout for waiting can be specified.
Version 3.08a
- Message Queue functionality enhanced
OS_Q_GetPtrCond() function enables conditional request of data from Queue without task suspension.
OS_Q_GetMessageCnt() functions delivers number of messages in the queue.
Version 3.08
- Message Queues
Message queues enable intertask communication with messages of various size.
Version 3.06h
- Modified for Tasking toolchain 2.1
- All embOS interrupts now defined in RTOSInit.c
An additional interrupt definition in assembler file is not required anymore. The RTOSVect.asm file is eliminated. Default UART for embOSView changed to UART0.
Version 3.06
- Serial interface for embOSView shared with application
The serial interface used for communication with embOSView is now available for the application.
embOSView can serve as a terminal for the target application in parallel with trace and profiling over the same serial interface.
The user application can call the new function OS_SendString() to send data to the terminal, OS_SetRxCallback() to set a callback function for received characters. - Trace build added
embOS can be traced during runtime with embOS Viewer version 3.06.
This allows monitoring of the API functions and their parameters called by the application.
Task- and API-specific filters can be defined via embOSView or directly by the application program via new API calls.
This functionality requires the trace build (NT, MT, FT or HT libraries) - New event function
OS_WaitEventTimed() implemented to handle timeout conditions during waiting for events. - New info function
OS_IsTask() implemented to check, whether task actually exists.
Version 3.04i
- Support for embOSView
embOS Viewer can communicate with embOS via UART if the MCU is properly initialized and the required interrupt routines are present. (Default is UART 1, 38400 baud). This can be easily changed in RTOSInit.c
embOSView is now shipped with the software. - Profiling
New profiling builds allow measurement of task execution times. - Improved support for nested interrupt
OS_EnterNestableInterrupt(), OS_LeaveNestableInterrupt() defined. - New timer functions introduced
OS_SetTimerPeriod(),OS_GetTimerPeriod() introduced, to modify / check reload value of timer.
OS_GetTimerStatus() introduced to check whether timer is active.
OS_GetTimerValue() introduced to check remaining time of timer. - Additional functions
OS_SetTimeSlice() added to modify the timeslice of a task during runtime.
OS_CreateCSema() modified; now an initial value of sema can be set. - Modified functions
OS_ClearEvent() now returns the actual state of events before clearing.
Improvements
Version 3.10f
- Memory requirements reduced
Granularity enhanced for non embOSView builds to save ROM and RAM
Version 3.06e
- Context switching time improved
Context switching time has been reduced to 373 clock cycles (23.3 us)
(near model, M16C62 @16MHz)
Program corrections
Version 3.20c
- OS_GetMailTimed() corrected
OS_GetMailTimed () did not retrieve a mail after 256 calls, the waiting task remained suspended. Corrected with version 3.20c of embOS.
This problem exists in all previous embOS versions and is fixed with version 3.20c.
Version 3.10p
- GetMail functions corrected
Internal functions for retrieving mail from a mailbox did not disable interrupts. This could cause message losses, when mail was written into mailboxes from within interrupt handlers.
This problem exists in all previous embOS versions and is fixed with version 3.10p.
Version 3.06h
- OS_Unuse error code corrected
When calling OS_Unuse() more often than OS_Use(), the debug version generated an OS_ERR_TASKLIST_CORRUPT error instead of OS_ERR_UNUSE_BEFORE_USE.
This problem exists in all previous embOS versions and is fixed with version 3.06h.
Version 3.04i
- Modified functions
OS_StartTimer() changed to match doc exactly.
OS_GetMailCond() had assertions which did not permit usage in interrupt or software timers (debug build only). Fixed.
Known problems
None
Release history
| Version | Release date | Short explanation |
| V3.20g | 16. Jul 2004 | New embOS sources 3.20g, toolchain 3.0 supported |
| V3.10q | 27. Jun 2003 | New embOS sources 3.10q, toolchain 2.3 supported |
| V3.06h | 23. Nov 2001 | New version for toolchain 2.1 |
| V3.06e | 21. Sep 2001 | New version with trace functionality |
| V3.04 | 01. Feb 2001 | First version with release history |
Miscellaneous
This document was first released with version 3.04i of the software.
Software released earlier is documented internally.
This information is available at request.
M16C/R8C, Tasking
