I have a project for which the overall level of optimisation is set to the maximum. However, for a few modules (e.g. ISRs) I tried to set an optimisation level below that of Common Block Subroutines. However, in the object code, there are common blocks thoughout. Is it possible to build a project with Common Block Subroutines optimisation for most of the code, but deselected for individual modules?
I cannot turn linker code packing off for a group. I have tried turning down optimisation to 7 for the specific file and this does seem to prevent common subroutines in the functions therein. Why does level 7 work when I would have expected level 8 to do the trick?
OPTIMIZE(8,SPEED) still performs common entry optimization. Did you try it with OPTIMIZE(7,SPEED)?
Have you turned off linker code packing for a group? I would think that should do it. Jon
Andy: The optimisation level for the entire project is set at 11. I have tried reducing the optimisation level to 8 for a group, for individual files and I have tried putting
#pragma OPTIMIZE(8,SPEED)
Are you using the LX51 linker and Linker Code Packing? Jon
...or the Manual shows you how to select the optimisation level on a function-by-function basis: http://www.keil.com/support/man/docs/c51/c51_optimize.htm
Can't you just select it in the individual file's properties? Or put all such files in a Group, and set it for the Group?
View all questions in Keil forum