汽车编程-Using the TASKING RTOS for TriCore.pdf
《汽车编程-Using the TASKING RTOS for TriCore.pdf》由会员分享,可在线阅读,更多相关《汽车编程-Using the TASKING RTOS for TriCore.pdf(140页珍藏版)》请在文库网上搜索。
1、Using the TASKING RTOS forTriCoreMA160-700 (v1.0) November 13, 2017Copyright 2017 TASKING BV.All rights reserved.You are permitted to print this document provided that (1) the use of such is for personal use onlyand will not be copied or posted on any network computer or broadcast in any media, and
2、(2) no modifications of thedocument is made. Unauthorized duplication, in whole or part, of this document by any means, mechanical or electronic,including translation into another language, except for brief excerpts in published reviews, is prohibited without theexpress written permission of TASKING
3、 BV. Unauthorized duplication of this work may also be prohibited by localstatute.Violators may be subject to both criminal and civil penalties, including fines and/or imprisonment. Altium,TASKING, and their respective logos are registered trademarks of Altium Limited or its subsidiaries. All other
4、registeredor unregistered trademarks referenced herein are the property of their respective owners and no trademark rights tothe same are claimed.Table of ContentsManual Purpose and Structure . vii1. Introduction to the RTOS Kernel . 11.1. Real-time Systems . 11.2. Real-time Operating System . 11.3.
5、 ISO 17356 . 21.3.1. Operating Sytem (OS) . 21.3.2. Communication (COM) . 31.3.3. Implementation Language (OIL) . 31.3.4. Run Time Interface (ORTI) . 31.3.5.The ISO 17356 Documentation . 31.4. The TASKING RTOS . 31.4.1.Why Using the TASKING RTOS? . 42. Getting Started . 52.1.What is an RTOS Project?
6、 . 52.2. Creating an RTOS Project . 72.3. Configuring the RTOS Objects and Attributes . 82.4. Generate RTOS Code . 102.5.TASKING RTOS Configurator Preferences . 112.6. Edit the Application Files . 112.7. Set the Project Options . 122.8. How to Build an RTOS Application . 132.9. How to Debug an RTOS
7、Application . 133. RTOS Objects and Attributes . 153.1.What are the OIL System Objects? . 153.1.1. Standard and Non-Standard Attributes . 153.1.2. Overview of System Objects and Attributes . 153.1.3. Non-Standard Attributes for the TriCore . 174. Startup Process . 194.1. Introduction . 194.2. System
8、 Boot . 194.3.The main() Module . 204.3.1. What are Application Modes? . 204.4. RTOS Initialization . 204.5. Shut-down Process . 214.6. API Service Restrictions . 235. Task Management . 255.1. What is a Task? . 255.2. Defining a Task in the C Source . 255.3.The States of a Task . 265.4.The Priority
9、of a Task . 265.4.1.Virtual versus Physical Priorities . 275.4.2. Fast Scheduling . 295.5. Activating and Terminating a Task . 295.6. Scheduling a Task . 325.6.1. Full-preemptive Tasks . 325.6.2. Nonpreemptive Tasks . 335.6.3. Scheduling Policy . 335.7.The Stack of a Task . 36iii5.8. C Interface for
10、 Tasks . 376. Events . 396.1. Introduction . 396.2. Adding Events . 396.3. Using Events . 406.4. The C Interface for Events . 447. Resource Management . 477.1. Key Concepts . 477.2. What is a Resource? . 487.3.The Ceiling Priority Protocol . 557.3.1. Priority Inversion . 557.3.2. Deadlocks . 567.3.3
11、. Description of The Priority Ceiling Protocol . 567.4. Grouping Tasks . 587.5.The Scheduler as a Special Resource . 617.6.The C Interface for Resources . 628. Alarms . 638.1. Introduction . 638.2. Counters . 638.2.1.What is a Counter? . 638.2.2.The RTOS System Counter . 648.3. What is an Alarm? . 6
12、68.4.The C Interface for Alarms . 719. Interrupts . 739.1. Introduction . 739.2. The ISR Object . 739.2.1.The ISR Non-Standard Attribute LEVEL . 749.3. Defining an Interrupt in the C Source . 749.4.The Category of an ISR Object . 749.5. Nested ISRs . 759.6. ISRs and Resources . 769.7. ISRs and Messa
13、ges . 789.8. Interrupt Disable/Enable Services . 799.8.1. Disable/Enable All Interrupts . 799.8.2. Suspend/Resume All Interrupts . 819.8.3. Suspend/Resume OS Interrupts . 829.9.The C Interface for Interrupts . 8310. Communication . 8510.1. Introduction . 8510.2. Basic Concepts . 8610.3. Configuring
14、Messages . 8710.4. Message Transmission . 9010.4.1. Sending a Message . 9010.4.2. How to Define the Data Type of a Message . 9010.4.3. Receiving a Message . 9110.4.4. Initializing Unqueued Messages . 9410.4.5. Long versus Short Messages . 9710.5. Message Notification . 9710.5.1. Notification Example
15、: Activate Task . 9810.5.2. Notification Example: Set Event . 100ivUsing the TASKING RTOS for TriCore10.5.3. Notification Example: Flag . 10010.5.4. Notification Example: Callback . 10310.6. Starting and Ending the COM . 10410.6.1. Starting the COM . 10410.6.2. Starting the COM Extension . 10510.6.3
16、. Stopping the COM . 10510.7. The C Interface for Messages . 10611. Error Handling . 10711.1. Introduction . 10711.2. Error Handling . 10711.2.1. Standard Versus Extended Status . 10711.2.2. Fatal Errors . 10811.2.3. The ErrorHook Routine . 10811.2.4. The COMErrorHook Routine . 11211.3. Debug Routin
17、es . 11411.4. RTOS Configuration Examples . 11512. Debugging an RTOS Application . 11712.1. Introduction . 11712.2. How to Debug the System Status . 11712.3. How to Debug Tasks . 11912.4. How to Debug Resources . 12012.5. How to Debug Alarms . 12112.6. How to Debug ISRs . 12112.7. How to Debug Messa
18、ges . 12212.8. How to Debug Contexts . 12212.9. How to Debug Stacks . 12313. Implementation Parameters . 12513.1. Introduction . 12513.2. Functionality Implementation Parameters . 12513.3. Performance Implementation Parameters . 12713.3.1. ISR Latency . 12713.3.2. Context Switch Latency . 12813.3.3.
19、 System Timer Latency . 129vUsing the TASKING RTOS for TriCore软件下载:https:/ 提取码:uo1z viUsing the TASKING RTOS for TriCoreManual Purpose and StructureManual PurposeThis manual aims to provide you with the necessary information to build real-time applications using theRTOS (Real Time Operating System)
20、micro kernel delivered with the toolset.This kernel implementsdesignated parts of the ISO 17356 standard.After reading the document, you should: know how the RTOS is implemented by Altium, understand the benefits of using the RTOS, know how to build real-time RTOS applications, be able to customize
21、RTOS settings in the Eclipse IDE to your project needs, be familiar with the most relevant RTOS concepts, know how to debug RTOS applications.This manual assumes that you have already read the Users Manual of the toolset documentation. The manual leads you through the hottest topics of configuring a
22、nd building RTOS applications, overview of the functionality, design hints, debugging facilities and performance.This manual expects you to have gone through the main topics of the online ISO 17356 standard documents. These documents should be, in fact, a constant reference during the reading of thi
23、s manual. Please refer to Manual StructureChapter 1, Introduction to the RTOS KernelProvides an introduction to the RTOS real-time multitasking kernel and provides a high-level introduction to real-time concepts.Chapter 2, Getting StartedContains an overview of the files (and their interrelations) i
24、nvolved in every RTOS application and includes a self explanatory diagram of the development process as a whole. Describes also how you can build your very first RTOS application guiding you step by step through the process.Chapter 3, RTOS Objects and AttributesDescribes the available RTOS objects a
25、nd attributes you can configure in the TASKING RTOS Configurator.viiChapter 4, Startup ProcessOpens the black-box of what happens in the system since application reset until the first application taskis scheduled and describes how you can interact with the start-up process by customizing certain Hoo
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 汽车编程-Using the TASKING RTOS for TriCore 汽车 编程 Using