M16C, NC30 v4

embOS for Renesas M16C6x / M16C20 was developed for and with Renesas's NC30 compiler and supports all memory models offered by this compiler. It comes with easy to use start projects for Renesas's tool manager version 3. Software development with PD30 emulator, simulator and KD30 ROM-Monitor is supported.
The current distribution of embOS M16C for NC30 compiler also contains a complete version for NC30 compiler V3 and toolmanager V2.

Resources and performance data

Memory usage
Kernel size (ROM) 1338 bytes
Kernel RAM usage 25 bytes
RAM usage per task control block 19 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 346 clock cycles (21.6 µs), independent of number of tasks
Interrupt latency time max. 141 clock cycles (8.8 µ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 NEAR memory model.

embOSView offers system analysis during runtime

embOSView with M30624 CPU

Available Emulators

  • Renesas
  • HP

Additional information

embOS M16C for NC30 compiler V3
Renesas Web site for additional CPU and compiler info / support


Release notes

Last Updated: 2002-10-22 [AW]

  1. Tool chain used for build
  2. Performance
  3. New features
  4. Improvements
  5. Program corrections
  6. Known problems
  7. Release history
  8. Miscellaneous

Tool chain used for build

The following tools have been used:


Compiler: Renesas CCOM30 Version 4.00.04
Assembler: Renesas AS30
Librarian: Renesas LB30
Workbench: Renesas TM Version 3.11

Performance

  1. Task switch time

  2. Near memory model: 21.6 us = 346 cycles
    Far memory model: 32.0 us = 513 cycles
  3. Interrupt latency

  4. Near memory model: 8.8 us = 141 cycles
    Far memory model: 20.2 us = 323 cycles

Absolute timings are based on an M16C/62 running at 16 MHz

New features

Version 3.10e

  1. New info functions
    OS_GetpCurrentTask() to identify the running task.
    OS_GetpCurrentTimer() to identify the timer whos callback is actually running.

Version 3.10

  1. OS_WaitSingleEvent()
    Unmasked events remain unchanged, when function returns.
  2. OS_WaitSingleEventTimed()
    Unmasked events remain unchanged, when function returns. Timeout for waiting can be specified.
  3. embOSView data transfer protocol modified
    New data format requires embOSView version 3.10 or later.

Version 3.08a

  1. 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

  1. Message Queues
    Message queues enable intertask communication with messages of various size.

Version 3.06h

  1. Renesas ROM monitor KD30 supported per default
    Now the distibution of embOS is configured for use of KD30 per default. Therefore the startup file ncrt30.a30 and the vector definition file sect30.inc are modified.
    To enable KD30 support, which uses UART1 for communication, the default setting of UART for embOSView was changed to UART0 in RTOSInit.c.

Version 3.06f

  1. OS_Use now returns a value
    When using a resource semaphore with a call of OS_Use(), the actual usage counter of the requested semaphore is returned as integer value. This may be helpful for some applications and is a lot more efficient than calling OS_Use() and then check the usage counter by calling OS_GetSemaValue().

Version 3.06

  1. 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.
  2. 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)
  3. New event function
    OS_WaitEventTimed() implemented to handle timeout conditions during waiting for events.
  4. New info function
    OS_IsTask() implemented to check, whether task actually exists.

Version 3.04r

  1. 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.
  2. Profiling
    New profiling builds allow measurement of task execution times.
  3. Improved support for nested interrupt
    OS_EnterNestableInterrupt(), OS_LeaveNestableInterrupt() defined.
  4. 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.
  5. 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.
  6. Modified functions
    OS_ClearEvent() now returns the actual state of events before clearing.

Improvements

Version 3.04r

  1. Context switching time improved
    Context switching time has been reduced to 24.5 us
    (near model, M16C62 @16MHz)
  2. Interrupt latency time reduced
    Interrupt latency times have been reduced to better than 8.0 us
    (near model, M16C62 @16MHz)

Program corrections

Version 3.10i

  1. OS_SendString() corrected
    When calling OS_SendString() with UART for embOSView disabled, the system was blocked. This problem exists in all previous embOS versions 3.10 and is fixed with version 3.10i.

Version 3.06f

  1. Round robin switch bug corrected
    Round robin task switch caused system malfunction when a higher prioritized task was activated from within an interrupt just the moment one of the round robin tasks was deactivated at the end of its time slice.
    This problem exists in all previous embOS versions and is fixed with version 3.06f.

Version 3.06e

  1. Task switch from interrupt corrected
    Multiple interrupts performing a taskswitch from within the interrupt handler caused a system malfunction. Further taskswitches were blocked. This error is corrected with version 3.06e.

Version 3.06b

  1. Trace functions defined in RTOS.h
    Some of the new trace functions were not defined in RTOS.h. This could result in warnings, when those functions were called from user application.

Version 3.06a

  1. Task switch from interrupt fixed
    Task switch from user defined interrupt routine did not work, when interrupt routine used local variables.

Version 3.04r

  1. 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.10i 22. Oct 2002 OS_SendString() corrected
V3.10e 22. Aug 2002 New sources version 3.10 with additional functions
V3.06h 27. Nov 2001 KD30 support enabled per default
V3.06f 27. Sep 2001 New fixed Version 3.06f
V3.06 21. May 2001 First version with trace functions
V3.04r 06. Mar 2001 First version with release history

Miscellaneous

This document was first released with version 3.04r of the software.
Software released earlier is documented internally.
This information is available at request.