Hello,
I am a C28x software developer and I noticed something related to
dead code elimination.
I commented out a function calling from my code (the function
definition remained) and the size of the out file decreased and the
function disappeared from the map file. This is what I expected.
This function was a RAM run function and there is a pragma at the
file beginning:
#pragma CODE_SECTION(StateMachine_XYZ, "ramfuncs");
When I commented out this pragma line too, the out file size was
bigger again and the function name showed up again in map file
(the function definition was still in the code). The pragma and the
function definition was in the same file as the (commented out)
funcion calling.
I thought if a function is not referenced should be removed from
executable code. Why depends the removing of unreferenced
function on ramfuncs pragma? Is this a glitch in dead code removing
method or is the normal behavior?
I use CCSv10, TI v20.2.5.LTS.