ITRON Internatinal Meeting '98

Overview of the µITRON4.0
and ITRON TCP/IP API Specification
4t
4thh N
Noovv.. 11999988
H
Hiirrooaakkii TTaakkaaddaa
IITTRROON
N TTeecchhnniiccaall CCoommm
miitttteeee
TTooyyoohhaasshhii UUnniivv.. ooff TTeecchhnnoollooggyy

Hiroaki Takada

IITTR
ROON
NP
Prroojjeecctt –– 2nd Phasea project to standardize RTOS and related
specifications for embedded systems
1st Phase (1984– )
focused on real-time kernel specifications
2nd Phase (1996– )
broaden the scope of the standardization effort
to related aspects
software components (software IP)
development environments
application-specific standards
Several standardization activities are in progress.
Hiroaki Takada

µITRON4.0µµIITTRROON
N44..00 –– W
Whhaatt aanndd WWhhyy??
µITRON4.0 is the next generation µITRON
real-time kernel specification.
Why it is necessary?
raising software portability
Software portability becomes significant asembedded software is getting larger.
Our “loose standardization” policy often
condradicts with software portability.
incorporating the results of our recent investigations
hard real-time system supports
investigation on automotive applications
following the advancement of microprocessors
Hiroaki Takada

µITRON4.0

P
Poorrttaabbiilliittyy vs. A
Addaappttaabbiilliittyy
Software portability can be raised if we
define the kernel functions more strictly.
Adaptability (incl. scalability) is the most important
advantage of µITRON, and we should keep it.
standard profile
the set of kernel functions strictly defined for
raising software portabilityµITRON4.0— loose standardization
standard profile — strict standardiation
Subsetting is still acceptable for small systems.
Extended functions are also defined.
Hiroaki Takada

µITRON4.0

S
Sttaannddaarrdd P
Prrooffiillee –– C
Coonncceepptt
Target Systemtarget processor: high-end 16bit to 32bit
kernel size: 10KB to 20KB with all functions
The whole software is linked to one module.
Kernel objects are statically defined.
Function Overview
including almost all level S functions of µITRON3.0
incorporating some level E functions of µITRON3.0
some modifications and more strict definitions
based on µITRON3.0
defining several new functions and APIs

Hiroaki Takada

µITRON4.0

S
Sttaannddaarrdd P
Prrooffiillee –– FFuunnccttiioonn OOvveerrvviieeww ((11))
Level S of µITRON3.0
basic task management and synchronizations
semaphore, eventflag, mailbox
interrupt management, basic time management
From Level E of µITRON3.0
fixed-sized memory pool, cyclic handler
service calls with timeout
Major Modifications / More Strict Definitions
act_tsk with queueing instead of sta_tsk
some terminologies and service call names
how to write an interrupt handler in C language
service calls used in an interrupt handlerHiroaki Takada

µITRON4.0

S
Sttaannddaarrdd P
Prrooffiillee –– FFuunnccttiioonn O
Ovveerrvviieeww ((22))
Newly Defined Functions
data queue (queue for one word messages)
exception handling mechanism
task exception routine, CPU exception handler
referencing system status
can_act, isig_tim
Static API
Standard description (in a system configurationfile) for defining kernel objects statically.
cre_tsk(...)— service call for creating a task
CRE_TSK(...) — static API for creating a task
common parameters
Hiroaki Takada

µITRON4.0Broader Scalability
Extended Functions
the other level E functions of µITRON3.0
hard real-time support
extended
auto ID assignment
level E
Automotive Control Profile
standarda bit smaller subset than level S
level S of µITRON3.0 with
automotive
control
stack sharing mechanism
level R
Minimum RequirementsµITRON3.0
minimum
Dormant state instead ofµITRON4.0
waiting state is mandatory.
All tasks can share a stack without waiting state.
Hiroaki Takada

µITRON4.0

Standardization Process
Hard Real-TimeStudy Group

RTOS Automotive Application
Technical CommitteeµITRON4.0 Study Groupkernel specification WG
debugging interface specification WG
application design guidelines WG
device driver design guidelines WG

TCP/IP APIJTRON

open study group
started in April, 1998
µITRON4.0 real-time kernel specification
will be publish in near future.
Hiroaki Takada

ITRON TCP/IP API

ITRON TCP/IP API Specification
TCP/IP protocol stack is one of the mostimportant software components, today.
The socket interface is not suitable for (esp. smallscale) embedded systems.
necessity of dynamic memory management
within the protocol stackErrors occurred within the protocol stack isnot notified to the application.

difference between UNIX process model andITRON (or real-time kernel) task modelStandard TCP/IP API suitable for embedded system
is required. ITRON TCP/IP API Specification
Hiroaki Takada

ITRON TCP/IP API

Design Approaches
based on the socket interface
The socket interface can be implemented
as a library on the new API.

laying importance on understandability
minimizing the necessity of dynamic memory
management within the protocol stack
optimized API for each protocol (TCP and UDP)
API for reducing the number of data copies
considerations for real-time applicationsexploiting the use of static configuration
harmonized with ITRON conventions, but
applicable to other RTOS
Hiroaki Takada

ITRON TCP/IP API

Differences with the Socket Interface
TCP API and UDP API are separately defined.
“End point” abstraction is adopted instead of“socket” abstraction. TCP end point for waiting forconnection requests and TCP connection end point
are handled as different objects.
Reduced copy API, TCP service calls for reducing
the number of data copies, is also defined.
tcp_get_buf
tcp_rcv_buf
tcp_snd_buf
tcp_rel_buf
Non-blocking calls and callbacks are supported.
The callback routine is used for receiving UDP
packets.
etc.
Hiroaki Takada

ITRON TCP/IP API

Standardization Process and Status
March 1997

Embedded TCP/IP Techincal
Committee is launched.
The specification (Ver. 1.0) is fixed.
April 1998
May 1998
approved by the ITRON TechnicalCommittee as an ITRON specification.
within a few month
A minor update is planned (Ver. 1.1).

Several companies (in Japan) are developping
protocol stack products conformant to thespecification.

Hiroaki Takada

Summary
Our Recent Results
ITRON TCP/IP API Specification
JTRON2.0 Specification
Current ActivitiesµITRON4.0 Real-Time Kernel Specification
Application Design Guidelines
Device Driver Design Guidelines
Future Activities
Interface specification between µITRON real-timekernel and debugging tools
ITRON Home Page
http://www.itron.gr.jp/
Hiroaki Takada