2. Introduction to Dynamic C

Dynamic C is an integrated development system for writing embedded software. It is designed for use with Rabbit controllers and other controllers based on the Rabbit microprocessor.

2.1 The Nature of Dynamic C

Dynamic C integrates the following development functions into one program:

Dynamic C has an easy-to-use, built-in, full-featured text editor. Dynamic C programs can be executed and debugged interactively at the source-code or machine-code level. Pull-down menus and keyboard short­cuts for most commands make Dynamic C easy to use.

Dynamic C also supports assembly language programming. It is not necessary to leave C or the develop­ment system to write assembly language code. C and assembly language may be mixed together.

Debugging under Dynamic C includes the ability to use printf commands, watch expressions, break­points and stack tracing. Watch expressions can be used to compute C expressions involving the target’s program variables or functions. Watch expressions can be evaluated while stopped at a breakpoint or while the target is running its program. Stack tracing shows function call sequences and parameter values.

Dynamic C provides extensions to the C language (such as shared and protected variables, costatements and cofunctions) that support real-world embedded system development. Dynamic C supports cooperative and preemptive multitasking.

Dynamic C comes with many function libraries, all in source code. These libraries support real-time pro­gramming, machine level I/O, and provide standard string and math functions.

2.1.1  Speed

Dynamic C compiles directly to memory. Functions and libraries are compiled and linked and downloaded on-the-fly. On a fast PC, Dynamic C might load 30,000 bytes of code in five seconds at a baud rate of 115,200 bps.

2.2 New Features from ANSI C

New features from ANSI/ISO C90 are gradually being added to Dynamic C.  

The following features were introduced in Dynamic C 10.60:

The following feature was introduced with Dynamic C 10.62:

The following features were introduced with Dynamic C 10.64:

2.3 Dynamic C Enhancements and Differences

Dynamic C offers a number of extensions to the standard C language.  These extensions are targeted for making your embedded development easier.

2.3.1   Dynamic C Enhancements

Many enhancements have been added to Dynamic C. Some of these are listed below.

Normally, Dynamic C takes care of memory management, but there are instances where the programmer will want to take control of it. Dynamic C has keywords and directives to help put code and data in the proper place, such as: root, xmem, and #memmap for code and far for data.

See Chapter 10 for further details on memory management.

2.3.2   Dynamic C Differences

The main differences in Dynamic C are summarized in the list below and discussed in detail in Chapter 4. “Language” and Chapter 14. “Keywords.”