This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Checking program size

Hello. How can I check weight of compiled program. I mean by that - how many kilobytes will it take up in program memory? Is it equal to size of .out file? I'm using ezdsp 5505 and it has 512 kbit eeprom. Generally I'm using debugger instead downloading program to eeprom memory, but recently I've realized that .out files are bigger than capacity of that memory, even for really simple programs. However, using debugger, they all work fine. How is that possible?

  • .out files contain much more than the program that gets loaded onto the device.  Most of the content is symbol information for the debugger.  If you want to get an idea of the real size of your program you can take a look at the .map file.  Check your \debug folder to see if one is being created.  If not you can change your build options to generate one.

     

    John

  • Ok, so I have that file, but is there any particular line I should look at?

  • Michal,

    In the "SECTION ALLOCATION MAP" portion of the file it will show you the sizes of the various output sections.  .text is the section primarily used for program code.

    John

     

     output                                  attributes/

    section   page    origin      length       input sections

    --------  ----  ----------  ----------   ----------------

    .text      0    0000f800    0000004a     

                      0000f800    00000022     main.obj (.text:main)

                      0000f822    0000001e     rts430.lib : boot.obj (.text:_c_int00_noinit_noexit)

                      0000f840    00000004                : pre_init.obj (.text:_system_pre_init)

                      0000f844    00000004                : exit.obj (.text:abort)

                      0000f848    00000002                : _lock.obj (.text:_nop)

  • Thanks JohnS. Now I understand. I've been just looking for line with total size of program code.