User`s manual

22 digi.com Quick Tutorial
3.5 Summary of Features
This chapter provided a quick look at the interface of Dynamic C and some of the powerful options avail-
able for embedded systems programming. The following several paragraphs are a summary of what we’ve
discussed.
Development Functions
When you load a program it appears in an editor window. You compile by clicking Compile on the task bar
or from the
Compile menu. The program is compiled into machine language and downloaded to the target
over the serial port. The execution proceeds to the first statement of main, where it pauses, waiting to run.
Press <F9> or select “Run” on the Run menu. If want to compile and run the program with one keystroke,
use <F9>, the run command; if the program is not already compiled, the run command compiles it.
Single Stepping
This is done with the F8 key. The F7 key can also be used for single stepping. If the F7 key is used, then
descent into functions will take place. With F8 the function is executed at full speed when the statement
that calls it is stepped over.
Setting Breakpoints
The F2 key is used to toggle a breakpoint at the cursor position. Prior to Dynamic C 9, breakpoints could
only be toggled while in run mode, either while stopped at a breakpoint or when the program ran at full
speed. Starting with Dynamic C 9, breakpoints can be set in edit mode and retained when changing modes
or closing the file.
Watch Expressions
A watch expression is a C expression that is evaluated on command in the Watches window. An expression
is basically any type of C statement that can include operators, variables, structures and function calls, but
not statements that require multiple lines such as for or switch. You can have a list of watch expres-
sions in the Watches window. If you are single stepping, then they are all evaluated on each step. You can
also command the watch expressions to be evaluated by using the <Ctrl+U> command. When a watch
expression is evaluated at a breakpoint, it is evaluated as if the statement was at the beginning of the func-
tion where you are single stepping.
Costatements
A costatement is a Dynamic C extension that allows cooperative multitasking to be programmed by the
user. Keywords, like abort and waitfor, are available to control multitasking operation from within
costatements.
Execution Tracing
Execution tracing allows you to follow the flow of your program’s execution in real time instead of single
stepping through it. The Trace window can show which statement was executed, what type of action it
was, when it was executed, and the contents of the registers after executing it. You can also save the con-
tents of the Trace window to a file.