Tool/software: TI C/C++ Compiler
Suppose I have the following function:
#pragma CODE_SECTION(funcA,"funcA_Section")
int funcA( int k, struct XX *x )
{ /* lots of code */ }
In the linker command file I can create the section, with enough space to hold the function, and all is OK.
But if the size of the function is unknown or likely to grow, I either have to allocate a large amount of memory for the function, or risk having to move it or other code.
Is there a smart way to a place the interface at a fixed location, but let the linker sort out the body?
This would work, but the double function call is inefficient.
#pragma CODE_SECTION(funcA,"funcA_Section")
int funcA( int k, struct XX *x )
{
return funcA_2( k, x );
}
I was wondering about
#pragma CODE_SECTION(funcA,"funcA_Section")
int funcA( int k, struct XX *x )
{
asm(" LB funcA_2");
}
But I can't think how to create funcA_2 in this case.
Any ideas?
Thanks.