This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Common Block Subroutines - Selective

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?

Parents
  • 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)
    
    before individual functions.

    None of these made any difference.

    In the end, I was able to eliminate common block subroutines from my ISRs by selecting 'Generate Assembler SRC File' and 'Assemble SRC File' for the individual file.

    Jon: yes I am using LX51 and Linker Code Packing.

    I had assumed that the Common Block Subroutines optimisation level and linker code packing were essentially the same thing. Now I am guessing that they are not. Some clarification would be appreciated.

Reply
  • 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)
    
    before individual functions.

    None of these made any difference.

    In the end, I was able to eliminate common block subroutines from my ISRs by selecting 'Generate Assembler SRC File' and 'Assemble SRC File' for the individual file.

    Jon: yes I am using LX51 and Linker Code Packing.

    I had assumed that the Common Block Subroutines optimisation level and linker code packing were essentially the same thing. Now I am guessing that they are not. Some clarification would be appreciated.

Children