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

Allocate the global variables to XDATA in small memory model

I have a MCS51 project which is compiled in small memory model, now I want to add a module to the project, the source files of the module comes from other non-C51 project, so I want to compile these source files with C51 in small memory model, but want to allocate all the global variables in this module to the XDATA ram.
I don't want to modify each variable to XDATA one by one, so is there any simple way to implement this requirment?

Your kind support is highly appreciated!

Thanks & Regards
aolin

Parents
  • "the add-on module comes from other non-C51 project"

    In that case, it is not likely to be optimised for the 8051 anyhow - so can you just change the whole project to the LARGE model?

    "That module has a bundle of source files, I have to modify one by one, that is a tough thing!"

    The tradeoff is always the same: do you want to save developer time at the cost of runtime size/performace, or do you want to spend development effort to minimise runtime requirements?

Reply
  • "the add-on module comes from other non-C51 project"

    In that case, it is not likely to be optimised for the 8051 anyhow - so can you just change the whole project to the LARGE model?

    "That module has a bundle of source files, I have to modify one by one, that is a tough thing!"

    The tradeoff is always the same: do you want to save developer time at the cost of runtime size/performace, or do you want to spend development effort to minimise runtime requirements?

Children
No data