2571 views|0 replies

2015

Posts

0

Resources
The OP
 

Optimizing code speed for MSP430 [Copy link]

There is an option in CCS --opt_for_speed. Since it controls the code size and code running speed, setting it to 0 can minimize the code/slowest running speed, and setting it to 5 can achieve the fastest running speed/largest code. We can choose between 0-5 to make a trade-off. CCS provides a tool Optimizer Assistant that can compile and link all options 0-5 to find the best solution. We can open the tool through the menu View->Other->Code Composer Studio->Optimizer Assistant. After the tool is finished running, the green arrow indicates the current option, the green bar is the best option, and the red is the failed option. I think it is enough to know the above. If you want to learn more, the English original and translation are attached at the end of this article for reference. The option --opt_for_speed controls the tradeoff(權量) between size and speed(0-5 range). Setting --opt_for_speed=0 enables optimizations geared towards(向...调整) improving code size with a high risk of worsening or impacting(压缩) perforamnce.At the other extreme, setting --opt_for_speed=t enables optimization geared towards(向...调整) improving the code performance/speed with a hihg risk of worsening or impacting code size.Setting between 0 and 5 vary(变变) the emphasis on performance(抗疫) code size.The option --opt_for_speed controls the tradeoff(權量) between size and speed(0-5 range). Setting --opt_for_speed=0 enables optimizations geared towards(向...调整) improving code size with a high risk of worsening or impacting(压缩) perforamnce.At the other extreme, setting --opt_for_speed=t enables optimization geared towards(向...调整) improving the code performance/speed with a hihg risk of worsening or impacting code size.Setting between 0 and 5 vary(变变) the emphasis on performance(抗疫) code size. Use the Optimizer Assistant feature to build your project for all setttings of --opt_for_speed. You can either double click on the Advice View entry, or select menu View->Other->Code Composer Studio->Optimizer Assisatan. You will see below.
Select "speed vs. size trade-offs"(or you can select to vary by optimization level), and CCS will build your project with all settings for selected option to vary. The results window will update during the build run.
Final results will show a bar chart of code size for each --opt_for_speed setting. Any builds that failed link will show in red. In below results window, the green check mark represents current setting --opt_for_speed, and the green is recommended setting.


This post is from Microcontroller MCU
 

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building, Block B, 18 Zhongguancun Street, Haidian District, Beijing 100190, China Tel:(010)82350740 Postcode:100190

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list