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.

<strong>TASKING</strong> <strong>VX</strong>-<strong>toolset</strong> <strong>for</strong> <strong>ARM</strong> <strong>User</strong> <strong>Guide</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 » Optimization.4. Select an optimization level in the Optimization level box.or:In the Optimization level box select Custom optimization and enable the optimizations you wanton the Custom optimization page.Optimization levelsThe <strong>TASKING</strong> C compiler offers four optimization levels and a custom level, at each level a specific setof optimizations is enabled.• Level 0 - No optimization: No optimizations are per<strong>for</strong>med. The compiler tries to achieve a 1-to-1resemblance between source code and produced code. Expressions are evaluated in the order writtenin the source code, associative and commutative properties are not used.• Level 1 - Optimize: Enables optimizations that do not affect the debug-ability of the source code. Usethis level when you encounter problems during debugging your source code with optimization level 2.• Level 2 - Optimize more (default): Enables more optimizations to reduce the memory footprint and/orexecution time. This is the default optimization level.• Level 3 - Optimize most: This is the highest optimization level. Use this level when yourprogram/hardware has become too slow to meet your real-time requirements.• Custom optimization: you can enable/disable specific optimizations on the Custom optimization page.Optimization pragmasIf you specify a certain optimization, all code in the module is subject to that optimization. Within the Csource file you can overrule the C compiler options <strong>for</strong> optimizations with #pragma optimize flagand #pragma endoptimize. Nesting is allowed:#pragma optimize e /* Enable expression... simplification */... C source ......#pragma optimize c /* Enable common expression... elimination. Expression... C source ... simplification still enabled */...#pragma endoptimize /* Disable common expression... elimination */152

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

Saved successfully!

Ooh no, something went wrong!