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

How to determine the actual usage for XDATA?

Hello,

I have a project with 512K flash for code and 64K SRAM for XDATA. After compiling with PK51, I got following infos about program size:
"data=188.0 xdata=51140 const=166971 code=203033".

My question is: does this mean the MAXIMUM usage for xdata is 51140? Or the actual space for xdata will increase when the code is up and running if there are pointer? How can I calculate the maximum/worst space requirement for xdata?

Any help is appreciated!

Thanks a lot
Henry

Parents
  • "does this mean the MAXIMUM usage for xdata is 51140?"

    It means that the sum of the storage requirements for objects having static storage duration plus the Keil-specific LARGE model (if appropriate for your configuration) data objects having automatic storage duration total to 51140 bytes.

    "Or the actual space for xdata will increase when the code is up and running if there are pointer?"

    That's for you to determine. Memory accesses through pointers are not accounted for by the toolchain.

    "How can I calculate the maximum/worst space requirement for xdata?"

    That's the kind of question that if it's not obvious to you and you have to ask, then we couldn't possibly tell you either.

Reply
  • "does this mean the MAXIMUM usage for xdata is 51140?"

    It means that the sum of the storage requirements for objects having static storage duration plus the Keil-specific LARGE model (if appropriate for your configuration) data objects having automatic storage duration total to 51140 bytes.

    "Or the actual space for xdata will increase when the code is up and running if there are pointer?"

    That's for you to determine. Memory accesses through pointers are not accounted for by the toolchain.

    "How can I calculate the maximum/worst space requirement for xdata?"

    That's the kind of question that if it's not obvious to you and you have to ask, then we couldn't possibly tell you either.

Children