Other Parts Discussed in Thread: TMS320F28069
I am using TMS320F28069. In my project I am using C runtime support library "rts2800_fpu32.lib" and "rts2800_fpu32_fast_supplement.lib" for faster FPU routines (sin, cos, atan2, ...). The linker knows to use this routines over the ones in "rts2800_fpu32.lib" because I've specified link order in project settings so that "rts2800_fpu32_fast_supplement.lib" is linked before "rts2800_fpu32.lib"
I am moving my code to run from FLASH, I am placing all my time critical code to "ramfuncs" section to load the code from FLASH to RAM and execute it from RAM for faster operation. As the FPU routines within "rts2800_fpu32_fast_supplement.lib" are in .text section, I am relocating them to ramfuncs within linker command file with following code:
ramfuncs: {
rts2800_fpu32_fast_supplement.lib<atan2_f32.obj>(.text)
rts2800_fpu32_fast_supplement.lib<div_f32.obj>(.text)
rts2800_fpu32_fast_supplement.lib<cos_f32.obj>(.text)
rts2800_fpu32_fast_supplement.lib<sin_f32.obj>(.text)
rts2800_fpu32_fast_supplement.lib<sqrt_f32.obj>(.text)
*(ramfuncs)
}
This works all well and good. My troubles start when I also want to place integer division routine "l_div.obj" from "rts2800_fpu32.lib" to "ramfuncs" section. From what I can observe adding one line to linker command file:
ramfuncs: {
rts2800_fpu32_fast_supplement.lib<atan2_f32.obj>(.text)
rts2800_fpu32_fast_supplement.lib<div_f32.obj>(.text)
rts2800_fpu32_fast_supplement.lib<cos_f32.obj>(.text)
rts2800_fpu32_fast_supplement.lib<sin_f32.obj>(.text)
rts2800_fpu32_fast_supplement.lib<sqrt_f32.obj>(.text)
*(ramfuncs)
rts2800_fpu32.lib<l_div.obj>(.text)
}
causes that linker does not take the linking order in consideration. When the project is compiled I can see in the .map file that sin, cos, div, sqrt and atan2 routines are linked from "rts2800_fpu32.lib2, and the linker issues warnings about missing sections:
"../cmd/2806x_lnk_RAM.cmd", line 72: warning #10068-D: no matching section rts2800_fpu32_fast_supplement.lib<atan2_f32.obj>(.text)"
Even if I place "l_div.obj" in its own section by:
ramfuncs_rts: {
rts2800_fpu32.lib<l_div.obj>(.text)
}
the linker still links "rts2800_fpu32.lib" before "rts2800_fpu32_fast_supplement.lib".
I would like to know why is this happening and what is the solution?

