13.07.2015 Views

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

TASKING VX-toolset for ARM User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Using the C CompilerFirst the compiler looks <strong>for</strong> the file stdio.h in the directory myinclude relative to the current directory.If it was not found, the compiler searches in the environment variable C<strong>ARM</strong>INC and then in the defaultinclude directory.The compiler now looks <strong>for</strong> the file myinc.h, in the directory where test.c is located. If the file is notthere the compiler searches in the directory myinclude. If it was still not found, the compiler searchesin the environment variable C<strong>ARM</strong>INC and then in the default include directory.4.4. Compiling <strong>for</strong> DebuggingCompiling your files is the first step to get your application ready to run on a target. However, duringdevelopment of your application you first may want to debug your application.To create an object file that can be used <strong>for</strong> debugging, you must instruct the compiler to include symbolicdebug in<strong>for</strong>mation in the source file.To include symbolic debug in<strong>for</strong>mation1. From the Project menu, select Properties <strong>for</strong>The Properties dialog appears.2. In the left pane, expand C/C++ Build and select Settings.In the right pane the Settings appear.3. On the Tool Settings tab, select C/C++ Compiler » Debugging.4. Select Default in the Generate symbolic debug in<strong>for</strong>mation box.Debug and optimizationsDue to different compiler optimizations, it might be possible that certain debug in<strong>for</strong>mation is optimizedaway. There<strong>for</strong>e, if you encounter strange behavior during debugging it might be necessary to reducethe optimization level, so that the source code is still suitable <strong>for</strong> debugging. For more in<strong>for</strong>mation onoptimization see Section 4.5, Compiler Optimizations.Invocation syntax on the command line (Windows Command Prompt)The invocation syntax on the command line is:carm -g file.c4.5. Compiler OptimizationsThe compiler has a number of optimizations which you can enable or disable.1. From the Project menu, select Properties <strong>for</strong>151

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!