Visualdsp++ 4.0 C/C++ Compiler and Library Manual for SHARC Processors CONTENTS
Total Page:16
File Type:pdf, Size:1020Kb
W4.0 C/C++ Compiler and Library Manual for SHARC® Processors Revision 5.0, January 2005 Part Number 82-001963-01 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, 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 PREFACE Purpose of This Manual ............................................................... xxxi Intended Audience ....................................................................... xxxi Manual Contents ........................................................................ xxxii What’s New in This Manual ....................................................... xxxiii 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 Hardware Tools Manuals .................................................. xxxix Processor Manuals ............................................................ xxxix VisualDSP++ 4.0 C/C++ Compiler and Library Manual iii for SHARC Processors CONTENTS Data Sheets ...................................................................... xxxix Notation Conventions ..................................................................... xl COMPILER C/C++ Compiler Overview ........................................................... 1-2 Compiler Command-Line Interface .............................................. 1-4 Running the Compiler ............................................................ 1-5 Specifying Compiler Options in VisualDSP++ ......................... 1-9 Compiler Command-Line Switches ....................................... 1-11 C/C++ Compiler Switch Summaries .................................. 1-11 C/C++ Mode Selection Switch Descriptions ...................... 1-22 -c89 ............................................................................. 1-22 -c++ ............................................................................. 1-22 C/C++ Compiler Common Switch Descriptions ................ 1-23 sourcefile ...................................................................... 1-23 -@ filename .................................................................. 1-23 -A name[tokens] ........................................................... 1-23 -aligned-stack ............................................................... 1-24 -alttok .......................................................................... 1-24 -annotate-loop-instr ...................................................... 1-25 -bss .............................................................................. 1-25 -build-lib ...................................................................... 1-25 -C ................................................................................ 1-25 -c ................................................................................. 1-26 -compatible-pm-dm ...................................................... 1-26 iv VisualDSP++ 4.0 C/C++ Compiler and Library Manual for SHARC Processors CONTENTS -const-read-write ........................................................... 1-26 -Dmacro[=definition] .................................................... 1-26 -debug-types ................................................................. 1-26 -default-linkage[-asm | -C | -C++] .................................. 1-27 -double-size[-32|-64] ..................................................... 1-27 -double-size-any ............................................................ 1-28 -dry .............................................................................. 1-28 -dryrun ......................................................................... 1-28 -E ................................................................................. 1-29 -ED .............................................................................. 1-29 -EE ............................................................................... 1-29 -extra-keywords ............................................................. 1-29 -flags-{asm|compiler|lib|link|mem} switch [,switch2 [,...]] 1-29 -float-to-int ................................................................... 1-30 -force-circbuf ................................................................ 1-30 -fp-associative ............................................................... 1-30 -full-version .................................................................. 1-30 -g .................................................................................. 1-31 -H ................................................................................ 1-31 -HH ............................................................................. 1-31 -h[elp] .......................................................................... 1-32 -I directory [{,|;} directory...] ......................................... 1-32 -I- ................................................................................. 1-32 -i .................................................................................. 1-33 VisualDSP++ 4.0 C/C++ Compiler and Library Manual v for SHARC Processors CONTENTS -include filename .......................................................... 1-33 -ipa .............................................................................. 1-33 -L directory[{;|,}directory…] ......................................... 1-34 -l library ....................................................................... 1-34 -M ............................................................................... 1-35 -MD ............................................................................ 1-35 -MM ............................................................................ 1-35 -Mo _filename_ ............................................................ 1-35 -Mt filename ................................................................ 1-35 -MQ ............................................................................ 1-36 -map filename .............................................................. 1-36 -mem ........................................................................... 1-36 -multiline ..................................................................... 1-36 -no-aligned-stack .......................................................... 1-36 -no-alttok ..................................................................... 1-36 -no-annotate ................................................................. 1-37 -no-annotate-loop-instr ................................................. 1-37 -no-bss ......................................................................... 1-37 -no-builtin ................................................................... 1-37 -no-circbuf ................................................................... 1-38 -no-db .......................................................................... 1-38 -no-defs ........................................................................ 1-38 -no-extra-keywords ....................................................... 1-38 -no-fp-associative .......................................................... 1-38 vi VisualDSP++ 4.0 C/C++ Compiler and Library Manual for SHARC Processors CONTENTS -no-mem ....................................................................... 1-39 -no-multiline ................................................................ 1-39 -no-saturation ............................................................... 1-39 -no-simd ....................................................................... 1-39 -no-std-ass .................................................................... 1-39 -no-std-def .................................................................... 1-40 -no-std-inc .................................................................... 1-40 -no-std-lib ...................................................................