iii
Contents
Requirements for MR100 Use......................................................................................................................................i
Document List...............................................................................................................................................................i
Right of Software Use...................................................................................................................................................i
Contents.............................................................................................................................................................iii
List of Figures .................................................................................................................................................viii
List of Tables..................................................................................................................................................... xi
1. User’s Manual Organization...................................................................................................................- 1 -
2. General Information ............................................................................................................................... - 3 -
2.1 Objective of MR100 Development......................................................................................................- 3 -
2.2 Relationship between TRON Specification and MR100...................................................................- 5 -
2.3 MR100 Features .................................................................................................................................- 6 -
3. Introduction to Kernel ............................................................................................................................- 7 -
3.1 Concept of Real-time OS ....................................................................................................................- 7 -
3.1.1 Why Real-time OS is Necessary................................................................................................. - 7 -
3.1.2 Operating Principles of Kernel................................................................................................. - 10 -
3.2 Service Call .......................................................................................................................................- 14 -
3.2.1 Service Call Processing .............................................................................................................- 15 -
3.2.2 Processing Procedures for Service Calls from Handlers......................................................... - 16 -
Service Calls from a Handler That Caused an Interrupt during Task Execution.............................................- 17 -
Service Calls from a Handler That Caused an Interrupt during Service Call Processing................................ - 18 -
Service Calls from a Handler That Caused an Interrupt during Handler Execution....................................... - 19 -
3.3 Object................................................................................................................................................. - 20 -
3.3.1 The specification method of the object in a service call ..........................................................- 20 -
3.4 Task................................................................................................................................................... - 21 -
3.4.1 Task Status................................................................................................................................ - 21 -
3.4.2 Task Priority and Ready Queue ...............................................................................................- 25 -
3.4.3 Task Priority and Waiting Queue.............................................................................................- 26 -
3.4.4 Task Control Block(TCB).......................................................................................................... - 27 -
3.5 System States....................................................................................................................................- 28 -
3.5.1 Task Context and Non-task Context........................................................................................ - 28 -
3.5.2 Dispatch Enabled/Disabled States........................................................................................... - 30 -
3.5.3 CPU Locked/Unlocked States................................................................................................... - 30 -
3.5.4 Dispatch Disabled and CPU Locked States............................................................................. - 30 -
3.6 Regarding Interrupts........................................................................................................................- 31 -
3.6.1 Types of Interrupt Handlers.....................................................................................................- 31 -
3.6.2 The Use of Non-maskable Interrupt ........................................................................................- 31 -
3.6.3 Controlling Interrupts...............................................................................................................- 32 -
3.7 Stacks ................................................................................................................................................- 34 -
3.7.1 System Stack and User Stack...................................................................................................- 34 -
4. Kernel.................................................................................................................................................... - 35 -
4.1.1 Module Structure.......................................................................................................................- 35 -
4.1.2 Module Overview....................................................................................................................... - 36 -
4.1.3 Task Management Function..................................................................................................... - 37 -
4.1.4 Synchronization functions attached to task ............................................................................- 39 -
4.1.5 Synchronization and Communication Function (Semaphore)................................................ - 43 -
4.1.6 Synchronization and Communication Function (Eventflag).................................................. - 45 -
4.1.7 Synchronization and Communication Function (Data Queue) ..............................................- 47 -