汽车编程-Using the TASKING Software Platform for AURIX.pdf
《汽车编程-Using the TASKING Software Platform for AURIX.pdf》由会员分享,可在线阅读,更多相关《汽车编程-Using the TASKING Software Platform for AURIX.pdf(26页珍藏版)》请在文库网上搜索。
1、Using the TASKING SoftwarePlatform for AURIXMA160-869 (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
2、media, and (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
3、 of TASKING 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.
4、 All other registeredor unregistered trademarks referenced herein are the property of their respective owners and no trademark rights tothe same are claimed.Table of Contents1. Introduction . 12. Organization of the Software Platform Repositories . 32.1. Device Stacks . 32.1.1. Peripherals . 42.1.2.
5、 Drivers . 42.2. Software Services . 53. Getting Started with the Software Platform Builder . 73.1. Creating a Software Platform Document . 73.2.Working with Device Stacks . 83.3. Configuring the Software Platform Plug-ins . 123.4. Generating and Using the Source Code . 143.5. Using the Sample Proje
6、cts . 163.6. API Reference . 173.7. Software Platform Builder Preferences . 184. Glossary . 21iii软件下载:https:/ 提取码:uo1z ivUsing the TASKING Software Platform for AURIXChapter 1. IntroductionWith TASKING Software Platform you can quickly create full-featured applications. A Software Platformis made up
7、 of software blocks, pieces of functionality that you can use in your application, like RTOSfacilities, peripheral access or software protocols.The exact contents of a Software Platform depend onthe need of your application.The Software Platform Builder is used to manage your Software Platform. It i
8、s both a graphical editor anda code generator. Collections of software modules are delivered as Software Platform repositories.The following figure shows the process to create your own Software Platform:A Software Platform repository may contain any kind of software, but typical modules include inte
9、rruptservices, timers, peripherals (hardware wrappers), drivers, kernel services (such as POSIX multithreading),device I/O, file system (FatFs), networking (TCP/IP), graphical user interface, etc.The main reasons for having software modules are: Integration. Modules do not live isolated. Quite the c
10、ontrary, they need to relate and interact with othermodules. For instance, they often define interfaces which are implemented by other modules. Software reuse. Software reuse means effectively to be capable of encapsulating all the informationof a component (hardware and/or software) in a consistent
11、 manner. Once this information is made1available, higher abstraction layers can use it to customize or configure the system after little (or none)user intervention. Hide complexity.Writing software from scratch is a time-consuming activity.To write software thataccesses or controls a peripheral, you
12、 need a thorough knowledge of how the peripheral works: whichregisters you need, which device specific commands to use, which communication protocols to use,and which interrupts to handle.The modules of the Software Platform repository take care of all these laborious lower level routinesand instead
13、 provide you with an easy to use Application Programming Interface (API) for each peripheralthat your application needs to control. Configurability. Embedded systems require very precise (compile-time) configuration mechanisms tomanage their intrinsic complexity. A typical module may show different
14、possible configurations thathave direct impact on the final behavior of the software.The main idea behind compile-time configurationsin embedded systems is to remove unnecessary functionality in order to enhance memory costs andreal-time performance. Expandability. Altium, but also other parties, ca
15、n adapt the modules and create their own modules.For information how to use the Software Platform Builder, see Chapter 3, Getting Started with the SoftwarePlatform Builder.2Using the TASKING Software Platform for AURIXChapter 2. Organization of the SoftwarePlatform RepositoriesSoftware Platform repo
16、sitories can contain numerous software modules that take care of lower levelsoftware routines as well as modules that offer extra functionality by providing you with a convenient API.The Software Platform consists of device stacks and software services.This chapter describes both partsand how they a
17、re related.2.1. Device StacksDevice stacks are all about making hardware peripherals available to application code through abstractand generic software interfaces. By placing more or less modules on a stack, you can choose theabstraction level you want to use in your application.The lowest level mod
18、ules are specific for a particularhardware device. On top of that, you can stack higher level modules that provide more generic functionalityto access the device. For example, at the higher, abstract level, you could choose to use a module toaccess a file system in your application. At the lower lev
19、els you still can select modules to decide whichspecific storage device you want to access (a hard drive, SD card, RAM drive, .) Thus, the lower levelmodules are more specific for a particular peripheral while the higher level modules are less hardwarespecific and can even be used in combination wit
20、h multiple peripheral devices.You can use the Software Platform Builder editor to build device stacks.ExampleThe following figure contains an ASCLIN ASC device stack and an ETH device stack.Each colored stack item represents a software module. In this example the ASCLIN stack consists of twomodules,
21、 for each abstraction level one. In general, your application interfaces only to the highest levelmodules.Device stacks may be composed of the following types of plug-ins: peripherals and drivers.32.1.1. PeripheralsPeripherals (the green stack items) are the lowest level modules.They provide informa
22、tion for the higherlayers of the stack to access the peripherals. Information such as the base address, interrupt assignmentand any soft peripheral configuration is all stored in the peripheral.Peripheral modules are meant to be instantiated. Each instance then corresponds to one device of thegiven
23、kind. Instances of peripherals do not normally require other instances.In most situations, your application does not access the peripherals directly, because the applicationaccesses them through the drivers interface on top of it.For most peripherals you need to use the TASKING Pin Mapper to configu
24、re the connections betweenperipherals and port pins. For information about the TASKING Pin Mapper see Using the TASKING PinMapper for AURIX.2.1.2. DriversDrivers (the yellow stack items) provide the next level of abstraction.They provide low-level access tospecific hardware either via a peripheral o
25、r via another driver.The difference between a driver and a peripheral is well defined.The peripheral only defines basicinformation about the hardware but provides no further functionality.This basic information can be usedby a driver which you can place on top of the peripheral.Driver modules are me
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 汽车编程-Using the TASKING Software Platform for AURIX 汽车 编程 Using
链接地址:https://www.wenkunet.com/p-6256771.html