Visualdsp++ 4.0 C/C++ Compiler and Library Manual for Tigersharc Processors CONTENTS
Total Page:16
File Type:pdf, Size:1020Kb
W4.0 C/C++ Compiler and Library Manual for TigerSHARC® Processors Revision 2.0, January 2005 Part Number 82-000336-03 Analog Devices, Inc. One Technology Way Norwood, Mass. 02062-9106 a Copyright Information ©2005 Analog Devices, Inc., ALL RIGHTS RESERVED. This document may not be reproduced in any form without prior, express written consent from Analog Devices, Inc. Printed in the USA. Disclaimer Analog Devices, Inc. reserves the right to change this product without prior notice. Information furnished by Analog Devices is believed to be accurate and reliable. However, no responsibility is assumed by Analog Devices for its use; nor for any infringement of patents or other rights of third parties which may result from its use. No license is granted by impli- cation or otherwise under the patent rights of Analog Devices, Inc. Trademark and Service Mark Notice The Analog Devices logo, the CROSSCORE logo, VisualDSP++, SHARC, TigerSHARC, and EZ-KIT Lite are registered trademarks of Analog Devices, Inc. All other brand and product names are trademarks or service marks of their respective owners. CONTENTS CONTENTS PREFACE Purpose of This Manual ............................................................... xxxi Intended Audience ....................................................................... xxxi Manual Contents Description ..................................................... xxxii What’s New in This Manual ........................................................ xxxii Technical or Customer Support .................................................. xxxiii Supported Processors .................................................................. xxxiv Product Information .................................................................. xxxiv MyAnalog.com ..................................................................... xxxiv Processor Product Information ............................................... xxxv Related Documents .............................................................. xxxvi Online Technical Documentation ........................................ xxxvii Accessing Documentation From VisualDSP++ ................. xxxvii Accessing Documentation From Windows ...................... xxxviii Accessing Documentation From the Web ........................ xxxviii Printed Manuals ................................................................... xxxix VisualDSP++ Documentation Set ..................................... xxxix VisualDSP++ 4.0 C/C++ Compiler and Library Manual iii for TigerSHARC Processors CONTENTS Hardware Tools Manuals .................................................. xxxix Processor Manuals ............................................................ xxxix Data Sheets ...................................................................... xxxix Notation Conventions .................................................................... xli COMPILER C/C++ Compiler Overview ........................................................... 1-3 Compiler Command-Line Interface .............................................. 1-5 Running the Compiler ............................................................ 1-6 Specifying Compiler Options in VisualDSP++ ....................... 1-10 Compiler Command-Line Switches ....................................... 1-12 C/C++ Compiler Switch Summaries .................................. 1-12 C/C++ Mode Selection Switch Descriptions ...................... 1-23 -c89 ............................................................................. 1-23 -c++ ............................................................................. 1-23 C/C++ Compiler Common Switch Descriptions ................ 1-24 sourcefile ...................................................................... 1-24 -@ filename .................................................................. 1-24 -A name [(<tokens>)] .................................................... 1-24 -align-branch-lines ........................................................ 1-25 -alttok .......................................................................... 1-25 -annotate-loop-instr ...................................................... 1-26 -bss .............................................................................. 1-26 -build-lib ...................................................................... 1-27 -C ................................................................................ 1-27 iv VisualDSP++ 4.0 C/C++ Compiler and Library Manual for TigerSHARC Processors CONTENTS -c .................................................................................. 1-27 -char-size-any ................................................................ 1-27 -char-size-{8|32} ............................................................ 1-27 -const-read-write ........................................................... 1-28 -Dmacro[=definition] .................................................... 1-28 -debug-types ................................................................. 1-28 -default-branch-{np|p} ................................................... 1-29 -default-linkage-{asm|C|C++} ........................................ 1-29 -double-size-any ............................................................ 1-29 -double-size-{32 | 64} .................................................... 1-29 -dry .............................................................................. 1-30 -dryrun ......................................................................... 1-31 -E ................................................................................. 1-31 -ED .............................................................................. 1-31 -EE ............................................................................... 1-31 -extra-keywords ............................................................. 1-31 -flags-{asm|compiler|lib|link|mem} switch [,switch2 [,...]] 1-32 -force-circbuf ................................................................ 1-32 -fp-associative ............................................................... 1-32 -fp-div-lib ..................................................................... 1-33 -full-version .................................................................. 1-33 -g .................................................................................. 1-33 -H ................................................................................ 1-34 -HH ............................................................................. 1-34 VisualDSP++ 4.0 C/C++ Compiler and Library Manual v for TigerSHARC Processors CONTENTS -h[elp] .......................................................................... 1-34 -I- ................................................................................ 1-34 -I directory [{,|;} directory...] ......................................... 1-35 -include filename .......................................................... 1-35 -ipa .............................................................................. 1-36 -L directory [{,|;} directory...] ........................................ 1-36 -l library ....................................................................... 1-36 -M ............................................................................... 1-37 -MD ............................................................................ 1-37 -MM ............................................................................ 1-37 -Mo filename ................................................................ 1-37 -Mt filename ................................................................ 1-37 -MQ ............................................................................ 1-38 -map filename .............................................................. 1-38 -mem ........................................................................... 1-38 -multiline ..................................................................... 1-38 -no-align-branch-lines ................................................... 1-38 -no-alttok ..................................................................... 1-38 -no-annotate ................................................................. 1-39 -no-annotate-loop-instr ................................................. 1-39 -no-bss ......................................................................... 1-39 -no-builtin ................................................................... 1-39 -no-circbuf ................................................................... 1-40 -no-const-strings ........................................................... 1-40 vi VisualDSP++ 4.0 C/C++ Compiler and Library Manual for TigerSHARC Processors CONTENTS -no-defs ........................................................................ 1-40 -no-extra-keywords ........................................................ 1-40 -no-fp-associative .......................................................... 1-40 -no-mem ....................................................................... 1-41 -no-multiline ................................................................ 1-41 -no-saturation ............................................................... 1-41 -no-std-ass .................................................................... 1-41 -no-std-def .................................................................... 1-41 -no-std-inc .................................................................... 1-42 -no-std-lib ...................................................................