Hi all, I am working with Infineon XC866 controller. I am measuring the number of cycles consumed by the keil built in libraries. To optimize the speed i am selecting Favour speed in the project settings.I have selected the level of optimization as 9.I could not find any improvement in the cycles. Further there is no improvement in the code size if i give Favour size in the project settings. Whether anyother settings should be taken care to generate an optimised code by the compiler? Please help me out Thanks in advance Chris
I am measuring the number of cycles consumed by the keil built in libraries. To optimize the speed i am selecting Favour speed in the project settings.I have selected the level of optimization as 9.I could not find any improvement in the cycles. congratulations Keil! If the optimizer can not optimize the code is already optimal. Erik
I guess you want the most compact code possible. The following link describes these options: http://www.keil.com/support/docs/2297.htm Reinhard
"The following link describes these options: http://www.keil.com/support/docs/2297.htm" But do those options have any effect on pre-built library code?
"I am measuring the number of cycles consumed by the keil built in libraries. To optimize the speed i am selecting Favour speed in the project settings." But the libraries contain code that has already been compiled - unless you obtain the source code and re-build it with these different options, they will make no difference at all to the library code Also, if you only have a little, simple code just calling library functions there will not be much to optimise - so optimisation will naturally show little effect!
It would, in a number of cases, be helpful if a compact version of a library was available. For example, memcpy() in the string library is quite a large function optimised for speed. (The same goes for most of the other functions in string.h). However, in an application for which code space is critical a compact version of memcpy() would be very useful.
Please help me out Help you with what? You've listed a couple of things you're doing, and some observations. I can't find any clearly stated problem in there that anybody could really help you address. So: what are you trying to achieve? Why? What did you try to achieve it? How did that fail to work?
"I have selected the level of optimization as 9. I could not find any improvement..." Relative to what? " Whether anyother settings should be taken care to generate an optimised code by the compiler?" Please read the manual: http://www.keil.com/support/man/docs/c51/c51_xc.htm