Hello,
I have a legacy project for PIC18F452 that compiles with HI-TECH Software C Compiler, using MPLAB IDE. The device's flash program memory is nearly full and I'm curious to see what occupies most of this space. How can I see memory footprint of compiled program, by modules?
The project consists of 19 'C' files; if the compiler told me how much memory each one uses, that would be great. Currently when I compile it only shows footprint by segments, as follows:
Memory Usage Map:
>
> Program ROM $000000 - $000005 $000006 ( 6) bytes
> Program ROM $000008 - $000015 $00000E ( 14) bytes
> Program ROM $000018 - $00006F $000058 ( 88) bytes
> Program ROM $000110 - $0005FF $0004F0 ( 1264) bytes
> Program ROM $0006B0 - $006CF7 $006648 ( 26184) bytes
> $006BA4 ( 27556) bytes total Program ROM
>
> RAM data $000047 - $0001DB $000195 ( 405) bytes
> RAM data $000504 - $0005FF $0000FC ( 252) bytes
> $000291 ( 657) bytes total RAM data
>
> Near RAM $000000 - $00000F $000010 ( 16) bytes total Near RAM
> Near bits $000080 - $0000B6 $000037 ( 55) bits total Near bits
> ROM data $000070 - $00010F $0000A0 ( 160) bytes
> ROM data $000600 - $0006AF $0000B0 ( 176) bytes
> $000150 ( 336) bytes total ROM data
>
> EEPROM Data $F00000 - $F0002F $000030 ( 48) bytes total EEPROM Data
>
>
> Program statistics:
>
> Total ROM used 27892 bytes (85.1%)
> Total RAM used 680 bytes (44.3%)
> Near RAM used 23 bytes (18.0%)
which is spectacular (wow, so much information), but not that useful. I.e as far as I understand, most program code just goes into the largest segment and little else can be said.
Best regards, Nickolai Leschov