MOTOROLA
Semiconductor Products Sector Application Note
Order Number: AN2009/D Rev. 1, 9/2001
Introduction to the StarCore SC140 Tools: An Approach in Nine Exercises
Emmanuel Roy and David Crawford
This document presents a quick, comprehensive
We recommend that you complete the exercises in sequential order. The exercises require the use of the SC140 C tools (including compiler, assembler, linker, and simulator) to generate executable files from C and assembly language source files and to verify the code performance. The tools are invoked from a command prompt (DOS or UNIX). If you desire, you can use an Integrated Development Environment (IDE). Be sure to consult the appropriate IDE manuals. This document provides
http://www.mot.com/SPS
Solutions to the exercises are provided at the end of this application note.
Recommended Reading
•SC140 Core Reference Manual, MNSC140CORE/D
•SC100 C/C++ Compiler User’s Manual, MSC100CCUM/D
•StarCore140 Family DSP Core Instruction Set, STCR140ISRM/D
•Multisample Programming Technique, STCR140MLTAN/D
| Contents |
|
1 | Preliminaries | 2 |
2 | File I/O Exercise | 4 |
3 | Integer and Fractional |
|
| Arithmetic Exercise | 5 |
3.1 | Hardware Support on StarCore | 5 |
3.2 | Compiler Support on StarCore | 6 |
4 | Local Versus Global |
|
| Optimization Exercise | 9 |
5 | Memory Alignment Exercise 12 | |
6 | Split Summation Exercise .... | 16 |
7 | 18 | |
8 | Control Code: The True Bit |
|
| Exercise | 21 |
9 | Calling an Assembly Routine |
|
| From C Exercise | 23 |
10 | The Challenge | 26 |
11 | Solutions to Exercises | 27 |
Introduction to the SC140 Tools
© Motorola, Inc. 2000