1. Installing Dynamic C
- 1.1 Requirements
- 1.2 Assumptions
2. Introduction to Dynamic C
- 2.1 The Nature of Dynamic C
- 2.1.1 Speed
- 2.2 Dynamic C Enhancements and Differences
- 2.3 Rabbit and Z180 Comparison
3. Quick Tutorial
- 3.1 Run DEMO1.C
- 3.1.1 Single Stepping
- 3.1.2 Watch Expression
- 3.1.3 Breakpoint
- 3.1.4 Editing the Program
- 3.2 Run DEMO2.C
- 3.2.1 Watching Variables Dynamically
- 3.3 Run DEMO3.C
- 3.3.1 Cooperative Multitasking
- 3.4 Run DEMO4.C
- 3.4.1 Trace Macros
- 3.5 Summary of Features
4. Language
- 4.1 C Language Elements
- 4.2 Punctuation Tokens
- 4.3 Data
- 4.3.1 Data Type Limits
- 4.4 Names
- 4.5 Macros
- 4.5.1 Macro Operators # and ##
- 4.5.2 Nested Macro Definitions
- 4.5.3 Macro Restrictions
- 4.6 Numbers
- 4.7 Strings and Character Data
- 4.7.1 String Concatenation
- 4.7.2 Character Constants
- 4.8 Statements
- 4.9 Declarations
- 4.10 Functions
- 4.11 Prototypes
- 4.12 Type Definitions
- 4.13 Aggregate Data Types
- 4.13.1 Array
- 4.13.2 Structure
- 4.13.3 Union
- 4.13.4 Composites
- 4.14 Storage Classes
- 4.15 Pointers
- 4.16 Pointers to Functions, Indirect Calls
- 4.17 Argument Passing
- 4.18 Program Flow
- 4.18.1 Loops
- 4.18.2 Continue and Break
- 4.18.3 Branching
- 4.19 Function Chaining
- 4.20 Global Initialization
- 4.21 Libraries
- 4.21.1 LIB.DIR
- 4.22 Headers
- 4.23 Modules
- 4.23.1 The Parts of a Module
- 4.23.2 Module Sample Code
- 4.23.3 Important Notes
- 4.24 Function Description Headers
- 4.25 Support Files
5. Multitasking with Dynamic C
- 5.1 Cooperative Multitasking
- 5.2 A Real-Time Problem
- 5.2.1 Solving the Real-Time Problem with a State Machine
- 5.3 Costatements
- 5.3.1 Solving the Real-Time Problem with Costatements
- 5.3.2 Costatement Syntax
- 5.3.3 Control Statements
- 5.4 Advanced Costatement Topics
- 5.4.1 The CoData Structure
- 5.4.2 CoData Fields
- 5.4.3 Pointer to CoData Structure
- 5.4.4 Functions for Use With Named Costatements
- 5.4.5 Firsttime Functions
- 5.4.6 Shared Global Variables
- 5.5 Cofunctions
- 5.5.1 Cofunction Syntax
- 5.5.2 Calling Restrictions
- 5.5.3 CoData Structure
- 5.5.4 Firsttime Functions
- 5.5.5 Types of Cofunctions
- 5.5.6 Types of Cofunction Calls
- 5.5.7 Special Code Blocks
- 5.5.8 Solving the Real-Time Problem with Cofunctions
- 5.6 Patterns of Cooperative Multitasking
- 5.7 Timing Considerations
- 5.7.1 waitfor Accuracy Limits
- 5.8 Overview of Preemptive Multitasking
- 5.9 Slice Statements
- 5.9.1 Slice Syntax
- 5.9.2 Usage
- 5.9.3 Restrictions
- 5.9.4 Slice Data Structure
- 5.9.5 Slice Internals
- 5.10 µC/OS-II
- 5.10.1 Changes to µC/OS-II
- 5.10.1.1 Ticks per Second
- 5.10.1.2 Task Creation
- 5.10.1.3 Restrictions
- 5.10.2 Tasking Aware Interrupt Service Routines (TA-ISR)
- 5.10.2.1 Interrupt Priority Levels
- 5.10.2.2 Possible ISR Scenarios
- 5.10.2.3 General Layout of a TA-ISR
- 5.10.3 Library Reentrancy
- 5.10.4 How to Get a µC/OS-II Application Running
- 5.10.4.1 Default Configuration
- 5.10.4.2 Custom Configuration
- 5.10.4.3 Examples
- 5.10.5 Compatibility with TCP/IP
- 5.10.5.1 Socket Locks
- 5.10.6 Debugging Tips
- 5.11 Summary
6. Debugging with Dynamic C
- 6.1 Debugging Features Prior to Dynamic C 9
- 6.2 Debugging Features Introduced in Dynamic C 9
- 6.3 Debugging Tools
- 6.3.1 printf()
- 6.3.2 Software Breakpoints
- 6.3.3 Single Stepping
- 6.3.4 Watch Expressions
- 6.3.5 Evaluate Expressions
- 6.3.6 Memory Dump
- 6.3.7 MAP File
- 6.3.8 Execution Trace
- 6.3.9 Symbolic Stack Trace
- 6.3.10 Assert Macro
- 6.3.11 Miscellaneous Debugging Tools
- 6.4 Where to Look for Debugger Features
- 6.4.1 Run and Inspect Menus
- 6.4.2 Options Menu
- 6.4.3 Window Menu
- 6.5 Debug Strategies
- 6.5.1 Good Programming Practices
- 6.5.2 Finding the Bug
- 6.5.2.1 Reproduce the Problem
- 6.5.2.2 Minimize the Failure Scenario
- 6.5.2.3 Other Things to Try
- 6.6 Reference to Other Debugging Information
7. The Virtual Driver
- 7.1 Default Operation
- 7.2 Calling _GLOBAL_INIT()
- 7.3 Global Timer Variables
- 7.3.1 Example: Timing Loop
- 7.3.2 Example: Delay Loop
- 7.4 Watchdog Timers
- 7.4.1 Hardware Watchdog
- 7.4.2 Virtual Watchdogs
- 7.5 Preemptive Multitasking Drivers
8. Run-Time Errors
- 8.1 Run-Time Error Handling
- 8.1.1 Error Code Ranges
- 8.1.2 Fatal Error Codes
- 8.2 User-Defined Error Handler
- 8.2.1 Replacing the Default Handler
- 8.3 Run-Time Error Logging
- 8.3.1 Error Log Buffer
- 8.3.2 Initialization and Defaults
- 8.3.3 Configuration Macros
- 8.3.4 Error Logging Functions
- 8.3.5 Examples of Error Log Use
9. Memory Management
- 9.1 Memory Map
- 9.1.1 Memory Mapping Control
- 9.1.2 Macro to Use Second Flash for Code
- 9.2 Extended Memory Functions
- 9.3 Code Placement in Memory
- 9.4 Dynamic Memory Allocation
10. File Systems
- 10.1 FS2
- 10.1.1 General Usage
- 10.1.1.1 Maximum File Size
- 10.1.1.2 Two Flash Boards
- 10.1.1.3 Using SRAM
- 10.1.1.4 Wear Leveling
- 10.1.1.5 Low-Level Implementation
- 10.1.1.6 Multitasking and FS2
- 10.1.2 Application Requirements
- 10.1.2.1 Library Requirements
- 10.1.2.2 FS2 Configuration Macros
- 10.1.2.3 FS2 and Use of the First Flash
- 10.1.3 File System API Functions
- 10.1.3.1 FS2 API Error Codes
- 10.1.4 Setting up and Partitioning the File System
- 10.1.4.1 Initial Formatting
- 10.1.4.2 Logical Extents (LX)
- 10.1.4.3 Logical Sector Size
- 10.1.5 File Identifiers
- 10.1.5.1 File Numbers
- 10.1.5.2 File Names
- 10.1.6 Skeleton Program Using FS2
- 10.2 FAT File System
- 10.2.1 Overview of FAT Documentation
- 10.2.2 Running Your First FAT Sample Program
- 10.2.2.1 Bringing Up the File System
- 10.2.2.2 Using the File System
- 10.2.3 More Sample Programs
- 10.2.3.1 Blocking Sample
- 10.2.3.2 Non-Blocking Sample
- 10.2.4 FAT Operations
- 10.2.4.1 Format and Partition the Device
- 10.2.4.2 File and Directory Operations
- 10.2.4.3 Error Handling
- 10.2.5 More FAT Information
- 10.2.5.1 Clusters and Sectors
- 10.2.5.2 The Master Boot Record
- 10.2.5.3 FAT Partitions
- 10.2.5.4 Directory and File Names
- 10.2.5.5 µC/OS-II and FAT Compatibility
- 10.2.5.6 SF1000 and FAT Compatibility
- 10.2.5.7 Hot-Swapping an xD Card
- 10.2.5.8 Hot-Swapping an SD Card
- 10.2.5.9 Unsupported FAT Features
- 10.2.5.10 References
11. Using Assembly Language
- 11.1 Mixing Assembly and C
- 11.1.1 Embedded Assembly Syntax
- 11.1.2 Embedded C Syntax
- 11.1.3 Setting Breakpoints in Assembly
- 11.2 Assembler and Preprocessor
- 11.2.1 Comments
- 11.2.2 Defining Constants
- 11.2.3 Multiline Macros
- 11.2.4 Labels
- 11.2.5 Special Symbols
- 11.2.6 C Variables
- 11.3 Stand-Alone Assembly Code
- 11.3.1 Stand-Alone Assembly Code in Extended Memory
- 11.3.2 Example of Stand-Alone Assembly Code
- 11.4 Embedded Assembly Code
- 11.4.1 The Stack Frame
- 11.4.1.1 Stack Frame Diagram
- 11.4.1.2 The Frame Reference Point
- 11.4.2 Embedded Assembly Example
- 11.4.3 The Disassembled Code Window
- 11.4.4 Local Variable Access
- 11.5 C Calling Assembly
- 11.5.1 Passing Parameters
- 11.5.2 Location of Return Results
- 11.5.3 Returning a Structure
- 11.6 Assembly Calling C
- 11.7 Interrupt Routines in Assembly
- 11.7.1 Steps Followed by an ISR
- 11.7.2 Modifying Interrupt Vectors
- 11.8 Common Problems
12. Keywords
- abandon
- abort
- align
- always_on
- anymem
- asm
- auto
- bbram
- break
- c
- case
- char
- cofunc
- const
- continue
- costate
- debug
- default
- do
- else
- enum
- extern
- firsttime
- float
- for
- goto
- if
- init_on
- int
- interrupt
- interrupt_vector
- __lcall__
- long
- main
- nodebug
- norst
- nouseix
- NULL
- protected
- register
- return
- root
- scofunc
- segchain
- shared
- short
- size
- sizeof
- speed
- static
- struct
- switch
- typedef
- union
- unsigned
- useix
- waitfor
- waitfordone (wfd)
- while
- xdata
- xmem
- void
- volatile
- xstring
- yield
- 12.1 Compiler Directives
- #asm
- #class
- #debug #nodebug
- #define
- #endasm
- #fatal
- #GLOBAL_INIT
- #error
- #funcchain
- #if #elif #else #endif
- #ifdef
- #ifndef
- #interleave #nointerleave
- #makechain
- #memmap
- #pragma
- #precompile
- #undef
- #use
- #useix #nouseix
- #warns
- #warnt
- #ximport
- #zimport
13. Operators
- 13.1 Arithmetic Operators
- +
- -
- *
- /
- ++
- --
- %
- 13.2 Assignment Operators
- =
- +=
- -=
- *=
- /=
- %=
- <<=
- >>=
- &=
- ^=
- |=
- 13.3 Bitwise Operators
- <<
- >>
- &
- ^
- |
- ~
- 13.4 Relational Operators
- <
- <=
- >
- >=
- 13.5 Equality Operators
- ==
- !=
- 13.6 Logical Operators
- &&
- ||
- !
- 13.7 Postfix Expressions
- ( )
- [ ]
- . (dot)
- ->
- 13.8 Reference/Dereference Operators
- &
- *
- 13.9 Conditional Operators
- ? :
- 13.10 Other Operators
- (type)
- sizeof
- ,
14. Graphical User Interface
- 14.1 Editing
- 14.2 Menus
- 14.2.1 Using Keyboard Shortcuts
- 14.2.2 File Menu
- 14.2.3 Edit Menu
- 14.2.4 Compile Menu
- 14.2.5 Run Menu
- 14.2.6 Inspect Menu
- 14.2.7 Options Menu
- Environment Options
- Editor Tab
- Gutter & Margin Tab
- Display Tab
- Syntax Colors Tab
- Code Templates Tab
- Debug Windows Tab
- Print/Alerts Tab
- Project Options
- Communications Tab
- Compiler Tab
- Debugger Tab
- Defines Tab
- Targetless Tab
- 14.2.8 Window Menu
- 14.2.9 Help Menu
15. Command Line Interface
- 15.1 Default States
- 15.2 User Input
- 15.3 Saving Output to a File
- 15.4 Command Line Switches
- 15.4.1 Switches Without Parameters
- 15.4.2 Switches Requiring a Parameter
- 15.5 Examples
- 15.6 Command Line RFU
16. Project Files
- 16.1 Project File Names
- 16.1.3 Active Project
- 16.2 Updating a Project File
- 16.3 Menu Selections
- 16.4 Command Line Usage
17. Hints and Tips
- 17.1 A User-Defined BIOS
- 17.2 Efficiency
- 17.2.1 Nodebug Keyword
- 17.2.2 In-line I/O
- 17.3 Run-time Storage of Data
- 17.3.1 User Block
- 17.3.2 Flash File System
- 17.3.3 WriteFlash2
- 17.3.4 Battery-Backed RAM
- 17.4 Root Memory Reduction Tips
- 17.4.1 Increasing Root Code Space
- 17.4.2 Increasing Root Data Space
Macros and Global Variables
- Macros Defined by the Compiler
- Macros Defined in the BIOS or Configuration Libraries
- Global Variables
- Exception Types
- Rabbit Registers
Map File Generation
- Grammar
Security Software & Utility Programs
- Rabbit Embedded Security Pack
- AES
- SSL
- Dynamic C Utilities
- Library File Encryption
- File Compression Utility
- Font and Bitmap Converter Utility
- Rabbit Field Utility
Additional Documentation
Software License Agreement
Index