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.

AWR2944: what is the real need of this tramp, how to save this additional memory being consumed by this tramp sections

Part Number: AWR2944

We see that for few  functions and variables .tramp is getting created during compilation.

We also see that it is consuming additional 30kb for the generated tramp's.

for e.g., 

1023f6d0  00000008  SWC_Appl_FaultManager.a : SWC_Appl_FaultManager.o (.tramp.FaultManager_SetFaultStatus.1)
8819ba1c 00000004 : SWC_Appl_FaultManager.o (.text.FaultManager_SetFaultStatus)

what is the actual need of this tramp sections?

when we tried to dissable this tramp using "--trampolines=off" software is not behaving as expected.

can you help us to understand what is the real need of this tramp, how to save this additional memory being consumed by this tramp sections.

  • Hi Naveen,

    You can refer to following link for trampoline

    10.4.7. Run-Time Environment Options — TI Arm Clang Compiler Tools User's Guide

    So basically, the Arm device has PC-relative call and PC-relative branch instructions whose range is smaller than the entire address space. When these instructions are used, the destination address must be near enough to the instruction that the difference between the call and the destination fits in the available encoding bits. If the called function is too far away from the calling function, the linker generates an error or generates a trampoline, depending on the setting of the --trampolines option (on or off).

    Your code might require trampolines. hence, it is not working in appropriate manner. 

    Thanks and Regards

    Animesh Anand