编 译 器 _keil的 优化选项问题 分类: 编译器类2013-01-11 14:12 280 人阅读 评论(0) 收藏 举报 applicationApplicationcompilationcompileroptimizationperformancePerformance 最近发现在keil 编译的时候,出现莫名的问题,貌似代码有被优化掉的问题,后来查了下相关的资料,貌似懂了点。 我选择的是默认的default 优化方式,上网看了下,默认的是 level2 级别优化,最后选择level0 就没有问题了 下面是网上找的资料,介绍了优化功能介绍 Getting the Best Optimized Code for your Embedded Application ARM Compilation Tools The ARM Compilation Tools are the only compilation tool s co -developed with the ARM processors, and specifically designed to optimally support the ARM architecture. They are a result of 20 years of development, and are recognized as the industry -leading C and C++ compilation tools for the ARM, Thumb, and Thumb -2 instructions sets. The ARM Compilation tools consist of: • The ARM Compiler, which enables you to compile C and C++ code. It is an optimizing compiler, and features command - line options to enable you to control the level of optimization • Linker and Utilities, which assign addresses and lay out sections of code to form a final image • A selection of libraries, including the ISO standard C libraries, and the MicroLIB C library which is optimized for embedded applications • Assembler, which generates machine code instructions from ARM, Thumb or Thumb-2 assembly- level source code Compiler Options for Embedded Applications The ARM Compilation Tools include a number of compiler optimizations to help you best target your code for your chosen microcontroller device and application area. They can be accessed from within µVision by clicking on Project – Options for Target. T he options described this document can be found on the Tar...