www.ti.com
3
SPRU523J–May 2001–Revised January 2016
Submit Documentation Feedback
Copyright © 2001–2016, Texas Instruments Incorporated
Contents
2.3.2 Loading the Application........................................................................................... 33
2.3.3 Configuring the Application ...................................................................................... 33
2.3.4 Testing the Application ........................................................................................... 34
2.4 The Network HelloWorld Example Application ......................................................................... 34
2.4.1 Building the Application........................................................................................... 34
2.4.2 Loading the Application........................................................................................... 34
2.4.3 Testing the Application ........................................................................................... 35
2.5 The Serial Client Examples ............................................................................................... 35
3 Network Application Development........................................................................................ 37
3.1 Configuring the NDK with XGCONF ..................................................................................... 38
3.1.1 Linked Libraries Configuration................................................................................... 40
3.1.2 Global Scheduling Configuration ................................................................................ 40
3.1.3 Global Buffer Configuration ...................................................................................... 42
3.1.4 Global Hook Configuration ....................................................................................... 42
3.1.5 Global Debug Configuration ..................................................................................... 43
3.1.6 Advanced Global Configuration ................................................................................. 44
3.1.7 Adding Clients and Servers...................................................................................... 45
3.2 Configuring the NDK with C Code (without XGCONF)................................................................ 45
3.2.1 Required SYS/BIOS Objects .................................................................................... 46
3.2.2 Include Files ....................................................................................................... 46
3.2.3 Library Files ........................................................................................................ 46
3.2.4 System Configuration ............................................................................................ 46
3.2.5 NDK Initialization .................................................................................................. 53
3.2.6 Adding NDK Hooks Using ACD Support ....................................................................... 57
3.3 Creating a Task............................................................................................................. 59
3.3.1 Initializing the File Descriptor Table............................................................................. 59
3.4 Example Code .............................................................................................................. 59
3.5 Application Debug and Troubleshooting ................................................................................ 61
3.5.1 Troubleshooting Common Problems ........................................................................... 61
3.5.2 Controlling Debug Messages .................................................................................... 63
3.5.3 Interpreting Debug Messages ................................................................................... 64
3.5.4 Memory Corruption................................................................................................ 64
3.5.5 Program Lockups.................................................................................................. 65
3.5.6 Memory Management Reports .................................................................................. 65
4 Network Control Functions.................................................................................................. 68
4.1 Introduction to NETCTRL Source ........................................................................................ 69
4.1.1 History .............................................................................................................. 69
4.1.2 NETCTRL Source Files .......................................................................................... 69
4.1.3 Main Functions .................................................................................................... 69
4.1.4 Additional Functions .............................................................................................. 70
4.1.5 Booting and Scheduling .......................................................................................... 70
4.2 NETCTRL Scheduler ...................................................................................................... 71
4.2.1 Scheduler Overview............................................................................................... 71
4.2.2 Scheduling Options ............................................................................................... 71
4.2.3 Scheduler Thread Priority ........................................................................................ 72
4.2.4 Tracking Events with STKEVENT............................................................................... 72
4.2.5 Scheduler Loop Source Code ................................................................................... 73
4.3 Disabling On-Demand Services .......................................................................................... 75
5 OS Adaptation Layer........................................................................................................... 78
5.1 Introduction to OS Source................................................................................................. 79
5.1.1 History .............................................................................................................. 79
5.1.2 Source Files........................................................................................................ 79
5.2 Task Thread Abstraction: TASK.C ....................................................................................... 79