Download GU0111 Using the TSK3000 Embedded Tools
Transcript
Table of Contents Table of Contents Getting Started with Embedded Software 1.1 1.2 1.3 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.5 1.5.1 1.5.2 1.6 1.6.1 1.6.2 1.6.3 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Embedded Software Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating an Embedded Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Adding a new source file to the project . . . . . . . . . . . . . . . . . . . . . . . . . Adding an existing source file to the project . . . . . . . . . . . . . . . . . . . . Setting the Embedded Project Options . . . . . . . . . . . . . . . . . . . . . . . . . Selecting a target processor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting the tool options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Building your Embedded Application . . . . . . . . . . . . . . . . . . . . . . . . . . Compiling a single source file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Rebuiling your entire application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Debugging your Embedded Application . . . . . . . . . . . . . . . . . . . . . . . . Setting breakpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Evaluating and watching expressions . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C Language 2.1 2.2 2.3 2.3.1 2.4 2.5 2.6 2.7 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.5.1 2.8 2.8.1 2.8.2 1-1 1-1 1-1 1-4 1-4 1-6 1-7 1-7 1-8 1-9 1-9 1-10 1-11 1-11 1-12 1-12 2-1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Memory Qualifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Placing an Object at an Absolute Address: __at() . . . . . . . . . . . . . . . Using Assembly in the C Source: __asm() . . . . . . . . . . . . . . . . . . . . . Pragmas to Control the Compiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Predefined Preprocessor Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameter Passing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Function Return Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Inlining Functions: inline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intrinsic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Interrupt Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining an Interrupt Service Routine: __interrupt() . . . . . . . . . . . . . . Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Printf and Scanf Routines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 2-2 2-3 2-3 2-4 2-8 2-10 2-11 2-11 2-12 2-12 2-14 2-14 2-14 2-15 2-15 2-16 iii