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

To access more than 64K of code in 8051

Hello,

I am working on a project using the 8051. I am almost on my completion of the project. But my code size has cross the 64k limit. I have heard that by using paging technique it is possible to access more than 64K code.

But i have no idea how to implement paging in 8051.Can any one help me for the same.

Thanks in anticipation.

Viral.

Parents
  • If you have only just gone over the limit and you are near the end of your project, it may be much better to try to reduce the size of your code rather than complicate things by using paging.

    My apologies in advance if you have already done this.

    The first, most obvious step, is the get the very latest version of the compiler linker and then wind up the optimisation level to give the most aggressive code compression possible. Of course, you may need to make exceptions for time critical sections of code.

    Then you might reconsider re-examining some of your source code. See appendix C of the C51 user guide to get started. The single most significant factor is likely to be the choice of memory model. Source code that is built in the large memory model tends to generate a lot of object code; making individual functions build in small or compact memory model can make a dramatic difference to both speed and size. Similarly, carefully choosing individual variables to be placed in data or pdata will also make a big difference.

    Getting the very best out of C51 and the linker is a matter of experience and patience.

Reply
  • If you have only just gone over the limit and you are near the end of your project, it may be much better to try to reduce the size of your code rather than complicate things by using paging.

    My apologies in advance if you have already done this.

    The first, most obvious step, is the get the very latest version of the compiler linker and then wind up the optimisation level to give the most aggressive code compression possible. Of course, you may need to make exceptions for time critical sections of code.

    Then you might reconsider re-examining some of your source code. See appendix C of the C51 user guide to get started. The single most significant factor is likely to be the choice of memory model. Source code that is built in the large memory model tends to generate a lot of object code; making individual functions build in small or compact memory model can make a dramatic difference to both speed and size. Similarly, carefully choosing individual variables to be placed in data or pdata will also make a big difference.

    Getting the very best out of C51 and the linker is a matter of experience and patience.

Children