Você está na página 1de 3

Lecture 3 - Software

Outline Programming Methods Code Composer Studio (CCS) Projects Working with C Source
C C ++

Programming the C6000


Efficiency* Effort
Compiler Optimizer 80 - 100% Low

Linear ASM

Assembly Optimizer

95 - 100%

Med

ASM

Hand Optimize

100%

High

* Typical efficiency vs. hand optimized assembly

Source Code Examples


8 9 :;"<
=>;"?"@ 8 9 :#;"< = $ 8 9 :;"< A $CB A <?":
D A < E F B A < B $ 8 9 :;"<
G"D=IH>J 8 :
K@ B H#J BCL ?":D A < B !#! E F G"D= ! HM=N3 B 5 -A 3 B 5 OQP
      "!#!#$ %" & ''  ( )"!#!#$ )%" )& '' * +,- . * "/0&"$ )&"$ 1 '' * +,- . * ("/0%"$ )%"$ )1 '' , .
 1"$ 2"$ 2 '' , .
( )1"$ )2"$ )2 ' '43 "56)  ,(  ' '43 "56,7)  , "$ "$ 

C6x Software Tools

C
9 ::
S  *MR 
T
T * +  ,7) ,   *   , J $ ? A < ;"S !#!#$ ; U S !#!#$ U ; $ U $ S
K :
V W"$ SK :
V $CW ? A < $C"$ ? A < 9 :
:S

3 ? A < 5X)

ASM

Linear ASM

Code Composer Studio


pq"ris"t u v"w xy r{z s"| q }| ~""4~"w  "| t rv t "w ~"w t v y
DSK Edit Asm Link .out Debug

Code Composer Environment

}  z } pq"" t q"q"u

}   z }  t "w ~"w t v y

Code Composer Studio Includes:


Y[Z \] ^_`ba-] ^-ced-c f ]gih^-jk _mlon>Z [M c ^lo^-\^-`ba-] f \m mZ ^a ] f m^-^`\ ^ ^a ] f m^a-\ a- f

Whats a Project?

Project Options
Indicates how output file should be constructed

Code Composer keeps track of all project files:



Source Library Command Etc.

You can add files to a project with drag-n-drop onto the .MAK file

Which Optimizations Where to find files/libs C62x or C67x How to link files Etc.

Full list of options found in Optimizing C/C++ Compiler Users Guide (SPRU187)

Compiler Options
Options -mv6700 -fr <dir> -g debug -s -k -mg -mt -o3 G -pm

Debug Compiler Options


Description Generate C6700 code (C6200 is default) Directory containing source files Enables src-level symbolic debugging Interlist C statements into assembly listing Keep assembly file Enables minimum debug to allow profiling No aliasing used Invoke optimizer (-o0, -o1, -o2/-o, -o3) Combine all C source files before compile CC Tab Compiler Compiler Comp/Asm Compiler Compiler Compiler Compiler Compiler Compiler

Optimization Compiler Options


Options -mv6700 -fr <dir> -g -s -k -mg -mt -o3 -pm -ms -oi0 Description Generate C6700 code (C6200 is default) icontaining = < : S= source files Directory Enables src-level symbolic debugging Interlist C statements into assembly listing Keep assembly file Enables minimum debug to allow profiling No aliasing used Invoke optimizer (-o0, -o1, -o2/-o, -o3) Combine all C source files before compile Minimize code size (-ms0/-ms, -ms1, -ms2) Disables automatic function inlining CC Tab Compiler Compiler Comp/Asm Compiler Compiler Compiler Compiler Compiler Compiler Compiler Compiler Options -g -l -s

Assembler Options
Description Enables src-level symbolic debugging Create assembler listing file (small -L) Retain asm symbols for debugging CC Tab Comp/Asm Assembler Assembler

speed opto

-gls

Linker Options
Options - o <file> - m <file> - c Description Output file name Map file name Auto-initialize global/static C variables CC Tab Linker Linker Linker

Options -mv6700 -fr <dir> -g debug -s -k -mg speed -mt opto -o3 -pm -l -s -o <dir> -m <dir> -c -l -i

Description Generate C6700 code (C6200 is default) Directory containing source files Enables src-level symbolic debugging Interlist C statements into assembly listing Keep assembly file Enables minimum debug to allow profiling No aliasing used Invoke optimizer (-o0, -o1, -o2/-o, -o3) Combine all C source files before compile Create assembler listing file (small -L) Retain asm symbols for debugging Output file name Map file name Auto-Init C variables (-cr turns off autoinit) Library archive file Defines #include search path

Options Tab Compiler Compiler Comp/Asm Compiler Compiler Compiler Compiler Compiler Compiler Assembler Assembler Linker Linker Linker Comp/Linker Comp/Linker

? =I9 ;"
 =N;"S :N9 ;"#  :D<

4b Cb 4b  C

# b b

C6000 C Data Types


Type
char, signed char unsigned char short unsigned short int, signed int unsigned int long, signed long unsigned long enum float double long double pointers

Config Tool

Size
8 bits 8 bits 16 bits 16 bits 32 bits 32 bits 40 bits 40 bits 32 bits 32 bits 64 bits 64 bits 32 bits

Representation
ASCII ASCII 2s complement binary 2s complement binary 2s complement binary 2s complement IEEE 32-bit IEEE 64-bit IEEE 64-bit binary

Config Tool
,B =NS9 B 8 B GiG W G"< = V G B A T ;"D
< :=N;"< B ?C;"9 9 W ?"K ;"< Gi ?"< :
K< ;"
9

Você também pode gostar