Other Parts Discussed in Thread: MSP430F5438
Hi,
First, I am using cl430 v3.0.1 on a MSP430F5438 MCU.
We are currently low in space and realize that we are actually linking all library functions into our final executable. From the documentation, I've modified our project to generate the list of dead functions (--gen_func_subsections when compiling and then --generate_dead_funcs_list at linking).
From the dead_funcs.xml, I conclude that I could save 8536 bytes in the final executable by avoiding compiling unused functions (sum of all <size> tags). I then tried what the guide proposes, recompile and link using --use_dead_funcs_list.
I did that and what I observe is:
- No .hex code reduction in the output
- From generated .asm files, I see that unused functions are actually moved in a subsection of .text, for example:
- .sect ".text" becomes .sect ".text:MyUnusedFunctionName"
- Using nm430 on the objects files, I see that addresses are lower (as expected) and:
- 00000000 t .text:MyUnusedFunctionName
- 00000000 T text:MyUnusedFunctionName
- The binary diff between the actual objects files are different, too.