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.

Question about ROM in MSP430 family



Hi,

I have a question about the compilation of programs for the MSP430 family. I would like to know if the compiler compiles unused functions and so if the total memory of the binary program is increased by the size of these unused functions, or if it doesn't treat them. In this last case, the memory of the program compiled is just the usefull parts of the program.

In other terms, I would like to know if I have to erase all the unused functions before compiling.

Thank you,

Sylvain

  • It depends. With GCC you can include the function-sections option while compiling and gc-sections when linking. This puts each function in its own named section at compile time and then the linker removes unused sections (garbage collection) at link time.

**Attention** This is a public forum