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

Program Size

Could someone kindly explain to me how I can interpret the size of my program from the output generated by the C51 compiler.

Data = 9.0
Xdata = 1717
Code = 2357

Thank you in advance.

Parents
  • This program uses 9 bytes of data space (internal RAM), 1717 bytes of xdata space (external RAM), and 2357 bytes of code space.

    Usually, "size of the program" means just the code. If you're concerned about the size of external memory you need it could be code space + xdata space.

    Often, you'll see a "const=xxxx" value. This is the size of literal constants such as strings or initialized arrays in your code space. Total code space would be code + const in such a case.

    The data space is sometimes reported with a decimal point, e.g. "data=123.6". This means the program uses 123 bytes of internal RAM, plus six bits (in the bit-addressable memory range).

    See chapter 3 of the C51 manual where it discusses memory areas. You might also want to consult your 8051 reference manual for its description of the architecture and programming model.

Reply
  • This program uses 9 bytes of data space (internal RAM), 1717 bytes of xdata space (external RAM), and 2357 bytes of code space.

    Usually, "size of the program" means just the code. If you're concerned about the size of external memory you need it could be code space + xdata space.

    Often, you'll see a "const=xxxx" value. This is the size of literal constants such as strings or initialized arrays in your code space. Total code space would be code + const in such a case.

    The data space is sometimes reported with a decimal point, e.g. "data=123.6". This means the program uses 123 bytes of internal RAM, plus six bits (in the bit-addressable memory range).

    See chapter 3 of the C51 manual where it discusses memory areas. You might also want to consult your 8051 reference manual for its description of the architecture and programming model.

Children