TEngine Middleware Tomas Sanchez Lopez Realtime Embedded Systems
T-Engine Middleware Tomas Sanchez Lopez Real-time & Embedded Systems Laboratory tomas@icu. ac. kr
A 2 N Contents T S ■ ■ ■ Introduction Middleware Classification Middleware Activities ■ ■ ■ ■ T-Format Device Drivers Subsystems T-Collection T-Builder T-Dist Conclusions
A N T 3 Introduction S T-Engine: An open standard platform for real-time, real-time embedded systems development Middleware: software agents acting as an intermediary between different application components
A N T 4 Introduction S T-Engine Middleware: Layer that provides services to application software with user-defined system calls, application tasks, and libraries offered by T-Kernel The T-Format specification standardizes formats for middleware source and execution code.
A 5 N Middleware Classification T S A - By the way it acts n n Subsystem-type Middleware Device Driver-type Middleware Library-type Middleware User Task-type Middleware B - By the service it provides n n Device Driver-type Middleware Abstract Device Driver-type Middleware Extended Kernel-type Middleware to provide general functions
A 6 N Middleware Classification - A T S n Subsystem-type Middleware n Middleware which acts as a subsystems on the T-Kernel n n n Called by the applications through its interface Called when event happens Device Driver-type Middleware n n More Uses the device management functionality provided by the T -Kernel Use it through general device driver interface provided by TKernel
A 7 N Middleware Classification - A T S n Library-type Middleware n n n Middleware that acts as a user library User apps need to be linked with it in code creation n Provided function or global variable User Task-type Middleware n n n Middleware that acts as a user-task server “Management server Task” User apps get services from it: n n Inter-task communication provided by T-Kernel Synchronization provided by T-Kernel
A 8 N Middleware Classification - B T S n Device Driver-type Middleware n Middleware that provides an API in a certain level of abstraction concerning: n n n Each device on T-Engine Each device connected to T-engine Communication devices connect other devices n To achieve portability, the API of lower level devices should be standardized Examples: RS 232 C driver, PCMCIA driver, Ethernet Driver, USB driver, Graphic Card Driver…
A 9 N Middleware Classification - B T S n Abstract Device-type Middleware n Provides SW interface of high abstraction to single or plural devices on T-Engine Examples: TCP/IP, Printing I/F, FAT file system, GUI package… n Extended Kernel-type Middleware n Middleware that provides service or higher abstraction level through T-Kernel or middleware functions to HW and SW resources managed by T-Kernel Examples: Process Management function, virtual memory function, loader function, CLI (command line interpreter)…
A 10 N Middleware Classification - B T S n Middleware to provide General Functions n n Provides general calculation functions Weak relation with kernel resources or external devices Examples: Sort function, Search function, random number generation function, encryption/authentication function…
A 11 N Middleware Activities T S n n n Related to the development of Middleware Standards n T-Format n Device Driver Specification Related to increasing amount of middleware n Subsystem design n Porting activities n T-collection n T-Builder Related to distribution of middleware n T-Dist
A 12 N Middleware Stnd. ~ T-Format T S n Code format of Middleware and application Software running on T-engine/T-Kernel. Source code style guidelines n n Source-code style format for middleware and applications running on T-Engine/T-kernel Source code written by various vendors can be compiled in one program Document format n Type and format of documentation attached and distributed with middleware and applications
A 13 N Middleware Stnd. ~ T-Format T S Binary-code format n n Executable binary format to run in T-Engine/T-kernel Follow the ELF format Compiler dependent part of the ELF format should follow the GNU-based reference environment and is separately defined by T-Engine forum Symbol rules for avoiding name conflicts when combining different pieces of software from different vendors n n n Global symbols (Exported functions, global variables, etc) Middleware Package name Version assignation Example: char unl_mpeg 2_etronid[16];
A 14 N Middleware Stnd. ~ Device Driver T S n Specifications of the Device Driver Interface Library n n Device Drivers consist of: n n Convenient dev. of device drivers designed to run on T-Kernel Interface layer Logical Layer Physical Layer Interface layer: Reduce burden on developers and bring together the aspects that can be standardized n SDI (Simple Device driver interface layer) Devices that can perform all processing immediately without queuing requests (i. e. RTC or other register-based devices) n GDI (General Device driver interface layer) For devices that must attend request in order of request (specially for those to interrupt processing) (i. e. RS-232 C)
A 15 N Middleware Stnd. ~ Device Driver T S SDI n GDI Also concerns about implementation issues: n n n Waiting functions Abort functions Buffer management between the OS and the requesting source n n DMA Interrupt handlers
A 16 N Middleware Stnd. ~ Device Driver T S Examples n Audio Device Driver n n n Enables audio IO with TEngine Provides audio codec control Allows extensions with more driver units and subunits (i. e. multiple implementations of ADC & DAC)
A N T 17 Middleware Stnd. ~ Device Driver S Examples n MIDI Device Driver n n n T-Engine Units lack of MIDI connector Control the protocol converters and sending or receiving logical MIDI streams Individual devices are controlled by application’s messages (not the MIDI driver) Back to Classification
A 18 N Increasing Middle. ~ Subsystems T S n T-Kernel doesn’t include file management, GUI-related, communication functions, etc n n n Implement these functionalities by adding subsystems to T-Kernel. Allows both lightweight and advanced systems on the same kernel T-Kernel Extensions provide: n Virtual Memory: Using MMU, create multiple virtual address spaces n Process Management functions: to modularize programs n Event Management functions: for mouse, keyboard, etc n File management functions Back to Classification
A 19 N Increasing Middle. ~ Porting Act. T S n Other systems hold a lot of software assets that could be very beneficial for the T-Engine n n Establish porting guidelines for reusing those assets Operate other systems on top of T-Kernel Examples: ITRON middleware, Windows CE. Net ITRON Middleware n n n 20 years of embedded development to reuse System call level highly compatible Porting main changes: n n Change in and reuse the Kernel API Changes to improve distribution (T-Format, Subsystems…)
A 20 N Increasing Middle. ~ Porting Act. T S n Hybrid mechanism of T-Kernel and other OS: T-Bus n n Provide Real-Time functionality to other OS Benefit from the guest OS capabilities (interoperation, GUI, etc) Digital Video Camera Example Hybrid implementation
A T Increasing Middle. ~ Porting Act. S J 2 ME with T-engine profiles Light-Weight Object Oriented programming framew. Linux Kernel on top of T-Kernel Middleware for third-generation mobile phones Windows CE. Net T-Windows N 21
A 22 N Increasing Middle. ~ T-Collection T S n Basic set of software that runs on T-engine and T-kernel n n n Standard format that makes easy to run code immediately Basic modules such as algorithms or large-scale practical software They are assumed to be Open-source Source code or binaries offered by T-Engine Forum Distributed with T-Dist Example of Collection: n n n Small library containing tree programs Sorting function Searching function Encryption and Signatures Data compression algorithms Basic resident programs (i. e TCP/IP, file system based on allocation tables)
A 23 N Increasing Middle. ~ T-Builder T S n Standard development environment n n Ensures de portability of middleware and application software Reference development environment n n n Vendors might provide better Development Environments compatible with T-Builder Adopted the GNU development environment Requirements n n Open Compatible with multiple CPUs
A 24 N Middleware Distrib. ~ T-Dist T S n n Distribute encrypted Software (binary) When the executable is run, the software is decrypted and billed using the e. Tron (License ticket) n n Prevent illegal use of Software Promoting Distribution • Generation of the encrypted Software by the server • License control using e. TRON • Software-specific License control
A 25 N Middleware Distrib. ~ T-Dist T S n Target Systems n Software n n n n Examples n Applications Subsystems Device Drivers Dynamic Libraries Contents n n Static Libraries Audio-Visual Software Electronic Book n Permit execution only on e. TRON systems that store a certain encryption key Payment mechanism based in the number of times the software runs
A N T 26 Middleware Distrib. ~ T-Dist S Server Client / e. TRON
A N T 27 Middleware Distrib. ~ T-Dist S Encrypted Middleware Format
A N T 28 Middleware Distrib. ~ T-Dist S Order User Agreement (T-Engine Forum acts as Proxy) T-engine Forum Middleware Vendor Software Registration Delivery Encrypted Use End of Use e. TRON/16 Chip • 16 bit CPU • 16 Mb Address Space • 4 Kb RAM • 96 Kb ROM • 32 Kb EEPROM e. TRON
A 29 N Conclusions T S n T-Engine forum emphasize the standardization and distribution methodology of the middleware n n Don’t directly provide software Encourage vendors to produce the software n n Easing development and interoperability Easing distribution Guarantying licensing Provision of tools for porting existing software as TEngine middleware n On top of the T-kernel
- Slides: 29