你的浏览器版本过低,可能导致网站不能正常访问!
为了你能正常使用网站功能,请使用这些浏览器。

MDK代码优化

[复制链接]
netlhx 提问时间:2015-7-28 11:04 /
阅读主题, 点击返回1楼
收藏 1 评论15 发布时间:2015-7-28 11:04
15个回答
netlhx 回答时间:2015-7-28 17:06:11
stary666 发表于 2015-7-28 13:43
看看,,,,,,,,,,,,

Mandelbrot_Set 回答时间:2015-7-28 17:13:59
netlhx 发表于 2015-7-28 17:06
多谢,能否再解释一句

参考手册(compiler user guide)吧:

#pragma Ospace
ARM Compiler toolchain v4.1 for µVision Compiler Reference
Home > Compiler-specific Features > Pragmas > #pragma Ospace

#pragma Ospace


This pragma instructs the compiler to perform optimizations to reduce image size at the expense of a possible increase in execution time.
[img][/img]Usage


This pragma enables you to assign optimization goals to individual functions.


[img][/img]Restriction


The pragma must be placed outside the function.

#pragma Onum
ARM Compiler toolchain v4.1 for µVision Compiler Reference
Home > Compiler-specific Features > Pragmas > #pragma Onum


#pragma Onum


This pragma changes the optimization level.
[img][/img]Syntax


#pragma OnumWhere:
numis the new optimization level.
The value of num is 0, 1, 2 or 3.




[img][/img]Usage


This pragma enables you to assign optimization levels to individual functions.


[img][/img]Restriction


The pragma must be placed outside the function.
#pragma Otime
ARM Compiler toolchain v4.1 for µVision Compiler Reference
Home > Compiler-specific Features > Pragmas > #pragma Otime


#pragma Otime


This pragma instructs the compiler to perform optimizations to reduce execution time at the expense of a possible increase in image size.
[img][/img]Usage


This pragma enables you to assign optimization goals to individual functions.


[img][/img]Restriction


The pragma must be placed outside the function.



#pragma push
ARM Compiler toolchain v4.1 for µVision Compiler Reference
Home > Compiler-specific Features > Pragmas > #pragma push


#pragma push


This pragma saves the current pragma state.
#pragma pop
ARM Compiler toolchain v4.1 for µVision Compiler Reference
Home > Compiler-specific Features > Pragmas > #pragma pop


#pragma pop


This pragma restores the previously saved pragma state.








Mandelbrot_Set 回答时间:2015-7-28 17:15:17
ctrl+C 效果那么差
netlhx 回答时间:2015-7-28 17:19:41
Mandelbrot_Set 发表于 2015-7-28 17:13
参考手册(compiler user guide)吧:

#pragma Ospace

明白了,非常感谢啊
yanhaijian 回答时间:2015-7-28 18:11:49
大家都在向高端发展了。
stary666 回答时间:2015-7-29 12:15:34
学习一下,,,
12

所属标签

相似问题

关于
我们是谁
投资者关系
意法半导体可持续发展举措
创新与技术
意法半导体官网
联系我们
联系ST分支机构
寻找销售人员和分销渠道
社区
媒体中心
活动与培训
隐私策略
隐私策略
Cookies管理
行使您的权利
官方最新发布
STM32N6 AI生态系统
STM32MCU,MPU高性能GUI
ST ACEPACK电源模块
意法半导体生物传感器
STM32Cube扩展软件包
关注我们
st-img 微信公众号
st-img 手机版