SYS/BIOS (TI-RTOS Kernel) V6.46 User's Guide
Total Page:16
File Type:pdf, Size:1020Kb
SYS/BIOS (TI-RTOS Kernel) v6.46 User's Guide Literature Number: SPRUEX3Q June 2016 Contents Preface . 9 1 About SYS/BIOS . 11 1.1 What is SYS/BIOS? . 12 1.2 How are SYS/BIOS and TI-RTOS Related?. 13 1.3 How are SYS/BIOS and XDCtools Related? . 14 1.3.1 SYS/BIOS as a Set of Packages . 14 1.3.2 Configuring SYS/BIOS Using XDCtools . 16 1.3.3 XDCtools Modules and Runtime APIs . 18 1.4 SYS/BIOS Packages . 19 1.5 Using C++ with SYS/BIOS . 19 1.5.1 Memory Management . 19 1.5.2 Name Mangling . 20 1.5.3 Calling Class Methods from the Configuration. 21 1.5.4 Class Constructors and Destructors . 21 1.6 For More Information . 22 1.6.1 Using the API Reference Help System . 23 2 SYS/BIOS Configuration and Building . 24 2.1 Creating a SYS/BIOS Project with the TI Resource Explorer. 25 2.2 Adding SYS/BIOS Support to an Existing Project. 27 2.3 Configuring SYS/BIOS Applications . 28 2.3.1 Opening a Configuration File with XGCONF . 29 2.3.2 Performing Tasks with XGCONF . 30 2.3.3 Saving the Configuration . 30 2.3.4 About the XGCONF views . 31 2.3.5 Using the Available Products View . 32 2.3.6 Using the Outline View. 33 2.3.7 Using the Property View . 34 2.3.8 Using the Problems View. 38 2.3.9 Finding and Fixing Errors. 38 2.3.10 Accessing the Global Namespace. 39 2.4 Building SYS/BIOS Applications. 40 2.4.1 Understanding the Build Flow . 40 2.4.2 Rules for Working with CCS Project Properties. 41 2.4.3 Building an Application with GCC . 41 2.4.4 Running and Debugging an Application in CCS . 43 2.4.5 Compiler and Linker Optimization . 44 3 Threading Modules . 46 3.1 SYS/BIOS Startup Sequence . 47 3.2 Overview of Threading Modules . 48 3.2.1 Types of Threads. 49 3.2.2 Choosing Which Types of Threads to Use . 49 SPRUEX3Q—June 2016 Contents 2 Submit Documentation Feedback www.ti.com Contents 3.2.3 A Comparison of Thread Characteristics. 50 3.2.4 Thread Priorities. 52 3.2.5 Yielding and Preemption . 53 3.2.6 Hooks. 55 3.3 Using SYS/BIOS on SMP Systems . 56 3.4 Hardware Interrupts . 57 3.4.1 Creating Hwi Objects . 57 3.4.2 Hardware Interrupt Nesting and System Stack Size . 58 3.4.3 Hwi Hooks . 59 3.5 Software Interrupts . 65 3.5.1 Creating Swi Objects . 65 3.5.2 Setting Software Interrupt Priorities . 66 3.5.3 Software Interrupt Priorities and System Stack Size . 67 3.5.4 Execution of Software Interrupts . 68 3.5.5 Using a Swi Object’s Trigger Variable . 69 3.5.6 Benefits and Tradeoffs. 72 3.5.7 Synchronizing Swi Functions . 73 3.5.8 Swi Hooks . 73 3.6 Tasks . 80 3.6.1 Creating Tasks. 81 3.6.2 Task Execution States and Scheduling . 82 3.6.3 Task Stacks . 84 3.6.4 Testing for Stack Overflow. 85 3.6.5 Task Hooks . 86 3.6.6 Task Yielding for Time-Slice Scheduling . ..