Hardware Reference
In-Depth Information
Figure 5.31 ICC12 window after adding files to the project “ICCTUTOR”
Figure 5.32 ICC12 project build message without errors
on the status pane. The gcd function and its test program have no errors, and the build message
is shown in Figure 5.32.
5.12.5 Executing and Debugging the Program with the ICC12 IDE
Unlike CodeWarrior, ICC12 does not have source-level debugging capability. The user
will need to use the D-Bug12 monitor commands to find out whether the program executes
correctly. Since variables declared within a function (including the main function) are local
variables, they are allocated in the stack and hence become invisible when the function is ex-
ited. In order to view the program execution result, the variables of interest must be declared
as global variables (i.e., outside all functions). In this example, the declaration of the variable
result should be moved out of the main function.
 
Search WWH ::




Custom Search