Motorola SC140 user manual Compiler Support on StarCore StarCore C Compiler

Page 10

Compiler Support on StarCore

StarCore C Compiler

C files

.c, .h

C Compiler

Front End

IR files

.obj

Global

Optimization

Cfiles

.c, .h

CCompiler Front End

IR files

.obj

Optimizer icode

Cfiles

.c, .h

CCompiler Front End

IR files

.obj

Assembler asmsc100

Object Library

Files, .elb

Assembler

 

Assembler

asmsc100

 

asmsc100

 

 

 

 

 

 

 

 

Linker

Figure 5. StarCore Global Optimization

Hands On

The benefit of Global Optimization is most apparent when several files containing cross references are used, as is often the case in any sizeable application. In this example, two files are used:

the main file called Ex3_main.c

a function file called Ex3_prod.c

The main file, Ex3_main.c, calls a routine defined in the function file Ex3_prod.c, as shown in

Figure 6.

10

Introduction to the SC140 Tools

Image 10
Contents Motorola Typical development process is represented in Figure Compiler Hands On File I/O ExerciseGood To Know Integer and Fractional Arithmetic Exercise Interpretation of 16-bit Integer and Fractional Data ValuesCompiler Support on StarCore Integer ArithmeticFractional Arithmetic Good To Know Local Versus Global Optimization Exercise Local OptimizationCompiler Support on StarCore StarCore C Compiler Local Optimization Global OptimizationMemory Alignment Exercise AA BB CC DD First Code Section Second Code Section Split Summation Exercise Code Generated Assembly Code Multi-Sample Exercise = ∑ a i x n For 0 ≤ n LIntermediate Version Compromise Between Memory and Speed Further Speed Optimization Control Code The True Bit Exercise Save Ex7.c as Ex71.c Calling an Assembly Routine From C Exercise Current Following output should be displayed Challenge Solutions to Exercises Introduction to the SC140 ToolsExercise AlignedExpected Motorola INC Intermediate version Compromise between Memory and Speed Compiler Support on StarCore Further Optimizing the Speed Compiler Support on StarCore Compiler Support on StarCore Motorola INC Zoffset equ Moffset equ Exercise Compiler Support on StarCore Compiler Support on StarCore AN2009/D