| No. | Content |
| 1 | Course Overview and System Installation
.C language history
.Developing environment installation
.Connecting dev board with PC
.How to transmit files to dev board |
| 2 | C Language Framework and Compiling
.Basic framework of C language source code
.Compiling and executing
.General compiling and executing
.Cross compiling and executing
.Using "make" to complie executable file
.Debug tool "gdb"
.How to execute remote-debugging
|
| 3 | Literals, Variables and Constants
.Four literals
- Integer:123, 0123, 0x123, 123L, 123LL and 123u
- Float:1.23, 1.23F, 1.23L and 1.23e-5
- Text:'a', L'a' and "Hello"
- Boolean:true and false
.Variable
- Declare formula:+/-, length, state, name = initial variable
- Name rules and habit
- Overflow v.s. underflow
- Fixed width variables:int8_t, uint8_t, int16_t and uint16_t...
- Casting
.Constant
- #define
- const
- enum
|
| 4 | Operators
.Operators overview
.Operators introduction
- Count operators
- Related operators
- Condition operators
- Bit operators
- Other operators
.Precedence and combination
.Expression
|
| 5 | Branch and Loop
.Branch:if~else and switch~case
.Loop:for, while and do~while
|
| 6 | Compound Data Construction
.Array
- Declared methods
- Arrangement in bottom layer momery
.String
- The difference between char * and char [ ]
- Common string function
.Struct
- Overview, definition and declaration
- Arrangement in bottom layer momery
- Method for struct members memory alignment access border
- Bitwise field structure
.Union
- Overview, definition and declaration
- Put union in embedded system uses
|
| 7 | Indicators
.Overview and definition:Indicators = accessing variable
.Declaration and initialization
.Indicators introduction and application
- Integer, float and character indicator
- Indicator:void *
- Array indicator
- Pointer of constant v.s. constant pointer
.How to access the particular address directly in embedded system
- Declared syntax
- Common data state:unsigned long *
- volatile
|
| 8 | Function
.Definition, declaration and calling
.Local variable, global variable and static variable
.How argument transmit:Call by value v.s. pass by address
.Function pointer
.Callback function
.Use function to get l-value or left value
|
| 9 | File Operation
.File streaming
.Use C standard library to access files:fopen(), fclose(),...
.Use Linux system to call and access files:open(), close(),...
|
| 10 | Preprocessor
.Preprocessor utilities
.#define
- Constants and function definition
- Stringify operator:#
- Token concatenation operator:##
.#if
- syntax:#ifdef, #if defined(...)
- Using opportunity
- Note:#if 0 ~ #else ~ #endif
.#include
- syntax:#include<...> and #include "..."
- Multiple include problem
.Others:#error, #pragma,...
|
| 11 | Using C to Simulate Object-Oriented
.Object-oriented overview and advantages
.Simulating encapsulation
.Simulating inheritance
.Simulating polymorphism
|
| 12 | Other Embedded C Skill
.GNU for C expansion syntax
- switch ~ case supporting "range"
- Zero length array
- __builtin_XXX serial functions
.The special if condition in embedded C:if (0= =x)
.Variable parameters of functions
.Program optimization skill
- Ring buffer
- Table look up
|