RTA-OSEK Binding Manual: TMS470/TI
Total Page:16
File Type:pdf, Size:1020Kb
RTA-OSEK Binding Manual: TMS470/TI Contact Details ETAS Group www.etasgroup.com Germany USA ETAS GmbH ETAS Inc. Borsigstraße 14 3021 Miller Road 70469 Stuttgart Ann Arbor, MI 48103 Tel.:+49 (711) 8 96 61-102 Tel.: +1 (888) ETAS INC Fax:+49 (711) 8 96 61-106 Fax: +1 (734) 997-94 49 www.etas.de www.etasinc.com Japan France ETAS K.K. ETAS S.A.S. Queen's Tower C-17F, 1, place des États-Unis 2-3-5, Minatomirai, Nishi-ku, SILIC 307 Yokohama, Kanagawa 94588 Rungis Cedex 220-6217 Japan Tel.: +33 (1) 56 70 00 50 Tel.: +81 (45) 222-0900 Fax: +33 (1) 56 70 00 51 Fax: +81 (45) 222-0956 www.etas.fr www.etas.co.jp Korea Great Britain ETAS Korea Co. Ltd. ETAS UK Ltd. 4F, 705 Bldg. 70-5 Studio 3, Waterside Court Yangjae-dong, Seocho-gu Third Avenue, Centrum 100 Seoul 137-889, Korea Burton-upon-Trent Tel.: +82 (2) 57 47-016 Staffordshire DE14 2WQ Fax: +82 (2) 57 47-120 Tel.: +44 (0) 1283 - 54 65 12 www.etas.co.kr Fax: +44 (0) 1283 - 54 87 67 www.etas-uk.net Copyright Notice © 2001 - 2007 LiveDevices Ltd. All rights reserved. Version: M00088-001 No part of this document may be reproduced without the prior written consent of LiveDevices Ltd. The software described in this document is furnished under a license and may only be used or copied in accordance with the terms of such a license. Disclaimer The information in this document is subject to change without notice and does not represent a commitment on any part of LiveDevices. While the information contained herein is assumed to be accurate, LiveDevices assumes no responsibility for any errors or omissions. In no event shall LiveDevices, its employees, its contractors or the authors of this document be liable for special, direct, indirect, or consequential damage, losses, costs, charges, claims, demands, claim for lost profits, fees or expenses of any nature or kind. Trademarks RTA-OSEK, RTA-TRACE and LiveDevices are trademarks of LiveDevices Ltd. Windows and MS-DOS are trademarks of Microsoft Corp. OSEK/VDX is a trademark of Siemens AG. All other product names are trademarks or registered trademarks of their respective owners. Issue M00088-001 Copyright Notice 1 Contents Contents 1 About this Guide ................................................................................ 1 1.1 Who Should Read this Guide?.................................................... 1 1.2 Conventions .............................................................................. 1 2 Toolchain Issues.................................................................................. 1 2.1 Compiler ................................................................................... 1 2.1.1 Using the 16-Bit/32-Bit Assembler Instruction Set............... 1 2.2 Assembler ................................................................................. 1 2.3 Linker/Locator............................................................................ 1 2.3.1 Stack Initialization for Different CPU Modes....................... 1 2.3.2 Linker Command File ........................................................ 1 2.4 Debugger .................................................................................. 1 3 Target Hardware Issues ....................................................................... 1 3.1 Interrupts .................................................................................. 1 3.1.1 Interrupt Levels................................................................. 1 Issue M00088-001 Contents 3 Contents 3.1.2 Interrupt Vectors............................................................... 1 3.1.3 Category 1 Handlers ......................................................... 1 3.1.4 Category 2 Handlers ......................................................... 1 3.1.5 Vector Table Issues ........................................................... 1 3.1.6 Software Vector Table....................................................... 1 3.1.7 Reset Vector..................................................................... 1 3.1.8 Handling Multiple Interrupt Sources .................................. 1 3.1.9 Handling single IRQ/FIQ interrupt sources .......................... 1 3.1.10 Phantom interrupt support ........................................... 1 3.2 CPU Operating Modes ............................................................... 1 3.3 Register Settings ........................................................................ 1 3.4 Stack Usage............................................................................... 1 3.4.1 Number of Stacks ............................................................. 1 3.4.2 Stack Usage within API Calls ............................................. 1 3.4.3 Stack Usage with 16-Bit/32-Bit Instructions........................ 1 3.4.4 Stack Usage in Tick_<Counter Name> ()............................ 1 4 Parameters of Implementation............................................................. 1 4.1 Functionality.............................................................................. 1 4.2 Hardware Resources .................................................................. 1 4.2.1 ROM and RAM Overheads ................................................ 1 4.2.2 ROM and RAM for OSEK OS Objects ................................. 1 4.2.3 Size of Linkable Modules................................................... 1 4.2.4 Reserved Hardware Resources........................................... 1 4.3 Performance.............................................................................. 1 4.3.1 Execution Times for RTA-OSEK API Calls ............................ 1 4.3.2 OS Start-up Time .............................................................. 1 4.3.3 Interrupt Latencies............................................................ 1 4.3.4 Task Switching Times........................................................ 1 4.4 Configuration of Run-time Context ............................................ 1 5 Compatibility with Pre-v5.00 Kernels ................................................... 1 5.1 Updating the Application Version............................................... 1 5.2 Changes between versions 3.1 and 5.00 .................................... 1 4 Contents Issue M00088-001 1.1 1 About this Guide This guide provides target-specific information for the TMS470/TI port of LiveDevices’ RTA-OSEK. It supplements the more general information in the RTA-OSEK User Guide . A port is defined as a specific target microcontroller/target toolchain pairing. This guide tells you about integration issues with your target toolchain and issues that you need to be aware of when using RTA-OSEK on your target hardware. Port specific parameters of implementation are also provided, giving the RAM and ROM requirements for each object in the RTA-OSEK Component and execution times for each API call to the RTA-OSEK Component. 1.1 Who Should Read this Guide? The reader should have an understanding of real time embedded programming in an OSEK context. You should read this guide if you want to know low-level technical information to integrate the RTA-OSEK Component into your application. 1.2 Conventions Important: Notes that appear like this contain important information that you need to be aware of. Make sure that you read them carefully and that you follow any instructions that you are given. Portability: Notes that appear like this describe things that you will need to know if you want to write code that will work on any processor running the RTA-OSEK Component. Program code, file names, C types and symbols, and RTA-OSEK API call names all appear in the courier typeface. When the name of an object is made available to the programmer the name also appears in the courier typeface, so, for example, a task named Task1 appears as a task handle called Task1 . Issue M00088-001 About this Guide 5 2.1 2 Toolchain Issues This chapter contains important details about RTA-OSEK and your toolchain. A port of the RTA-OSEK Component is specific to both the target hardware and a specific version of the compiler toolchain. You must make sure that you build your application with the supported toolchain. If you are interested in using a different version of the same toolchain, please contact LiveDevices to confirm whether or not this is possible. 2.1 Compiler The RTA-OSEK Component was built using the following compiler: Vendor Texas Instruments Inc. Compiler TMS470 C/C++ Compiler Version v4.4.1 The compulsory compiler options for application code are shown in the following table: Option Description -c Compile only, do not link --abi=tiabi use TI ABI The prohibited compiler options for application code are shown in the following table: Option Description --abi=eabi use ARM ABI The C file that RTA-OSEK generates from your OIL configuration file is called osekdefs.c . This file defines configuration parameters for the RTA-OSEK Component when running your application. The compulsory compiler options for osekdefs.c are shown in the following table: Option Description -c Compile only, do not link --abi=tiabi use TI ABI -mt/--code_state=16 Generate 16-bit code --symdebug:none No debug output The prohibited compiler options for osekdefs.c are shown in the following table: Issue M00088-001 Toolchain Issues 7 2.2 Option Description --abi=eabi use ARM ABI 2.1.1 Using the 16 -Bit/32 -Bit Assembler Instruction Set The TI compiler can generate object code using either the TMS470 16-bit or 32-bit instruction set. The RTA-OSEK run-time libraries have been compiled using the 16-bit instruction set to reduce the