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.

How to measure the code size of a dedicated function?

Other Parts Discussed in Thread: CCSTUDIO

Hi,

I use 28027 now, but I want to know what the exactly the code size of a dedicate function such as SVPWM.

However from map file the information is not so clear as ARM-Cortex M family....

Can this thing easy in 280x family with CCStudio 6?

Best Regards,

Maxwell

  • Hi Maxwell,

    The .map file is the only file that gives you detailed break-up on the memory allocation. I'm not sure what more are you seeking for!

    Regards,
    Gautam
  • Hi Gautam,
    Thanks for your reply, but I do not find the information I want as your description.
    In fact I want to measure the code size of SVPWM in M3 and 28027.

    The following is M3 map file
    SVPWM 0x1fff9689 Thumb Code 524 motor_math.o(i.SVPWM)

    The following is C2000 map file
    page address name
    ---- ------- ----
    0 00008000 .text
    0 0000805d C$$EXIT
    0 00008086 _SVPWM
    1 00000700 __STACK_END
    abs 00000300 __STACK_SIZE

    I do not understand all the information in C2000 map.
    Please teach me how to measure the dedicated function code size in C2000.
    It is very important for us to evaluate C2000 solution...
    Do I need add any command in property option?

    Best Regards,
    Maxwell
  • Hi, 

    put the function in its own section with #pragma directive

    #pragma CODE_SECTION(function, "fucntion_section");
    void function(void)

    You might try the compiler option to put each function to individual section.

    Regards, Mitja

  • I agree with Matja - if it is in its own section it should show up in the memory map file.