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

Need help on 8051 assembly code optimization

We are developing a product on 8051 microcontroller. We have done coding using assembly language. Right now our code size is very high and is overshooting the allocated ROM size.

We have started code optimization using “code optimizing tips†and by “optimizing the designâ€. But from “assembler and linker†I am unaware of any directive available for code optimization.

Please let me know for any tools/KEIL options which help in "Assembly code optimization" (Eg: Identifying repeated patterns, identifying duplicate expressions, removal of dead code, Suggesting right instruction etc…)

Parents
  • Let me start by saying that I'm not a C51 guy. but I can say that the RealView compiler (for an ARM), normally does not change anything in functions that are completely written in assembly (using the __asm directive at the prototype of the function), but do offer some optimization for inline assembly (inline assembly has very limited capabilities, under the RealView compiler). Is you assembly code even available for optimization?

Reply
  • Let me start by saying that I'm not a C51 guy. but I can say that the RealView compiler (for an ARM), normally does not change anything in functions that are completely written in assembly (using the __asm directive at the prototype of the function), but do offer some optimization for inline assembly (inline assembly has very limited capabilities, under the RealView compiler). Is you assembly code even available for optimization?

Children
No data