Transcription of SYS/BIOS (TI-RTOS Kernel)
1 SYS/BIOS (TI- rtos Kernel) User's GuideLiterature Number: SPRUEX3 TMay 2017 SPRUEX3T May 2017 Contents2 Submit Documentation Feedback ContentsPreface .. 91 About SYS/BIOS .. is SYS/BIOS ? .. are SYS/BIOS and TI- rtos Related? .. are SYS/BIOS and XDCtools Related? .. as a Set of Packages .. SYS/BIOS Using XDCtools .. Modules and Runtime APIs .. Packages and APIs.. Object Creation .. Thread Support .. C++ with SYS/BIOS .. Management .. Mangling .. Class Methods from the Configuration.. Constructors and Destructors .. More Information .. the API Reference Help System .. 252 SYS/BIOS Configuration and Building .. a SYS/BIOS Project with the TI Resource Explorer .. SYS/BIOS Support to an Existing Project.. SYS/BIOS Applications .. a Configuration File with XGCONF .. Tasks with XGCONF.
2 The Configuration .. the XGCONF views .. the Available Products View .. the Outline View.. the Property View .. the Problems View.. and Fixing Errors.. Accessing the Global Namespace .. SYS/BIOS Applications .. the Build Flow .. for Working with CCS Project Properties.. an Application with GCC .. and Debugging an Application in CCS .. and Linker Optimization .. 463 Threading Modules .. Startup Sequence .. of Threading Modules .. 50 SPRUEX3T May 2017 Contents3 Submit Documentation Feedback of Threads .. Which Types of Threads to Use .. Comparison of Thread Characteristics .. Priorities.. and Preemption .. SYS/BIOS on SMP Systems .. Interrupts .. Hwi Objects .. Interrupt Nesting and System Stack Size .. Hooks .. Interrupts .. Swi Objects .. Software Interrupt Priorities.
3 Interrupt Priorities and System Stack Size .. of Software Interrupts .. a Swi Object s Trigger Variable .. and Tradeoffs.. Swi Functions .. Hooks .. Tasks.. Execution States and Scheduling .. Stacks .. for Stack Overflow.. Hooks .. Yielding for Time-Slice Scheduling .. Idle Loop .. Using Hwi, Swi, and Task Threads .. 1034 Synchronization Modules .. Example .. Module .. Posted Events .. Gate Implementations .. Gate Implementations.. Inversion .. the SYS/BIOS Gate Type .. FIFO Operation of a Queue .. Over a Queue .. and Removing Queue Elements .. Queue Operations .. 1275 Timing Services .. of Timing Services .. 1294 Contents SPRUEX3T May 2017 Submit Documentation Module .. Module .. Module .. 1346 Support Modules .. for Application Support and Management.
4 Module .. Module .. Module .. Module .. Module .. Module .. Module .. Module .. Module .. 1427 Memory .. Map .. an Available Platform.. a Custom Platform.. Sections into Memory Segments .. Simple Section Placement .. Section Placement Using a SectionSpec .. a Supplemental Linker Command File.. Linker Command File and Customization Options .. and Memory Mapping for MSP430, Stellaris M3, and C28x .. Stack .. Stacks .. Configuration .. Cache Size Registers at Startup .. Parameters to Set MAR Registers .. Runtime APIs .. Memory Allocation .. Policy .. the Default System Heap .. the Module .. a Heap for Module Dynamic Instances .. malloc() and free() .. Implementations .. 1668 Hardware Abstraction Layer .. Abstraction Layer APIs.. Module.
5 A C Function with a System Interrupt Source .. 169 SPRUEX3T May 2017 Contents5 Submit Documentation Feedback Instance Configuration Parameters .. a Hwi Object Using Non-Default Instance Configuration Parameters .. and Disabling Interrupts .. Simple Example Hwi Application .. Interrupt Dispatcher .. Saved and Restored by the Interrupt Dispatcher.. Target/Device-Specific Hwi Module Functionality .. Module .. Timer Modules .. Module.. Interface Functions .. Package Organization .. 1829 Instrumentation .. of Instrumentation .. Module .. Module Configuration .. Load Statistics .. Handling.. Tools in Code Composer Studio .. Optimization .. Logging.. Diagnostics .. a Heap Manager .. Configuration.. Checking .. 192 ARebuilding SYS/BIOS .. SYS/BIOS Using the Makefile.
6 Your Project Using a Rebuilt SYS/BIOS .. 197 BTiming Benchmarks .. Benchmarks .. Latency .. Interrupt Benchmarks .. Interrupt Benchmarks .. Benchmarks .. Benchmarks .. 203 CSize Benchmarks .. Application Sizes .. Task Application .. Semaphore Application .. Mutex Application .. Clock Application .. Module Application Sizes .. Task Application.. Semaphore Application .. 2126 Contents SPRUEX3T May 2017 Submit Documentation Mutex Application.. Clock Application .. Application Sizes .. Pthread Application .. Semaphore Application .. Mutex Application.. Timer Application .. 214 DMinimizing the Application Footprint .. Data Size .. the malloc Heap .. the Size of Stacks .. the Default Task Stack Size.. Named Modules .. Text Strings Off the Target .. the Number of atexit Handlers.
7 Code Size .. the Custom Build SYS/BIOS Libraries .. Logging .. Memory Policies .. Core Features .. printf() .. RTS Thread Protection .. Task Stack Overrun Checking .. Exception Management .. Size Benchmark Configuration Script .. 220 EDeprecated Input/Output Modules .. Drivers and TI- rtos .. of the GIO Model .. Drivers in the Device Table .. the GIO Module .. GIO APIs .. When Using GIO APIs .. and Deleting GIO Channels .. GIO_read() and GIO_write() The Standard Model .. GIO_issue(), GIO_reclaim(), and GIO_prime() The Issue/Reclaim Model .. () and Error Handling.. GIO in Various Thread Contexts.. GIO with Tasks .. GIO with Swis .. GIO with Events.. and Synchronization Mechanisms.. GIO with Generic Callbacks.. 239 FIOM Interface .. Interface Overview.
8 241 GRevision History .. 250 Index .. 253 SPRUEX3T May 20177 Submit Documentation Feedback of Figures3-1 Thread Priorities .. 543-2 Preemption Scenario .. 563-3 Using Swi_inc() to Post a Swi .. 733-4 Using Swi_andn() to Post a Swi .. 743-5 Using Swi_dec() to Post a Swi .. 743-6 Using Swi_or() to Post a Swi.. 753-7 Execution Mode Variations .. 864-1 Trace Window Results from Example 4-4 .. 115B 1 Hardware Interrupt to Blocked Task .. 200B 2 Hardware Interrupt to Software Interrupt .. 200B 3 Post of Software Interrupt Again .. 201B 4 Post Software Interrupt without Context Switch.. 201B 5 Post Software Interrupt with Context Switch .. 201B 6 Create a New Task without Context Switch.. 202B 7 Create a New Task with Context Switch .. 202B 8 Set a Task's Priority without a Context Switch.. 202B 9 Lower the Current Task's Priority, Context Switch.
9 203B 10 Raise a Ready Task's Priority, Context Switch .. 203B 11 Task Yield .. 203B 12 Post Semaphore, No Waiting Task .. 204B 13 Post Semaphore, No Context Switch.. 204B 14 Post Semaphore with Task Switch .. 204B 15 Pend on Semaphore, No Context Switch .. 204B 16 Pend on Semaphore with Task Switch .. 2058 SPRUEX3T May 2017 Submit Documentation of Tables1 1TI- rtos Components .. 131 2 XDCtools Modules Using in C Code and Configuration .. 181 3 Packages and Modules Provided by SYS/BIOS .. 191 4 Benefits of Various Object Creation Styles .. 213-1 Comparison of Thread Characteristics .. 533-2 Thread Preemption .. 563 3 Hook Functions by Thread Type .. 573 4 System Stack Use for Hwi Nesting by Target Family .. 613 5 System Stack Use for Swi Nesting by Target Family .. 703-6 Swi Object Function Differences .. 723 7 Task Stack Use by Target Family.
10 875 1 Timeline for One-shot and Continuous Clocks .. 1317 1 Heap Implementation Comparison .. 1608 1 Proxy to Delegate Mappings.. 182C 1 SYS/BIOS 6 Benchmark Applications.. 207G 1 SPRUEX3T Revision History .. 250G 2 SPRUEX3S Revision History .. 250G 3 SPRUEX3R Revision History .. 250G 4 SPRUEX3Q Revision History .. 251G 5 SPRUEX3P Revision History .. 251G 6 SPRUEX3O Revision History .. 251G 7 SPRUEX3N Revision History .. 252 SPRUEX3T May 2017 Read This First9 Submit Documentation Feedback PrefaceSPRUEX3T May 2017 Read This FirstAbout This ManualThis manual describes SYS/BIOS , which is the kernel component of TI- rtos . SYS/BIOS is also called "TI- rtos kernel " in some documents. This document was published in conjunction with the release of SYS/BIOS , but it may be used with later versions of SYS/BIOS if changes to the software do not cause this document to be gives developers of mainstream applications on Texas Instruments devices the ability to develop embedded real-time software.
