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.

What is $Tramp$ in memory browser of CCS?

Hello,

Would you please explain to me what is $Tramp$ in memory browser of CCS?

For example, please refer figure 1 below. The functions in red box (ScanFlash() are HaHa()) are defined by me in my project. The functions in green box (SysCtlDelay(), SysCtlClockGet() and UARTprintf()) are standard functions from one of the libraries I am using. SysCtlDelay(), SysCtlClockGet() and UARTprintf() are called within ScanFlash().


Figure 1. Screen shot of CCS debugger memory window for my project

Background Details

I want that ScanFlash() must completely execute from SRAM. So, I create a small region in SRAM (SRAM_FUNC) in the CCS linker command file where I create a region (.delaytext) in which I want to place the functions that I want to execute completely from SRAM. See the lines in red box.

 

Figure 2. Excerpt from linker command file

Next, in my source code, before main() I do the following to place the functions I want to run from SRAM in .delaytext region. See code in red box.


Figure 3. Excerpt from my source code before main()

Now, when I launch the CCS debugger, open the memory browser and go to address where SRAM_FUNC begins, I see what you see in Figure 1 above. i.e. the function I defined do not have any prefix (such as $Tramp$), but the functions I call form library have $Tramp$’’T$L$PI$.

Question:

What does this prefix $Tramp$’’T$L$PI$ means?

Thanks!

  • Ashish,

    These symbols are most probably trampolines - for a nice explanation (much nicer than anything I could write here), check section 6 of the app note below:

    http://www.ti.com/lit/an/spraa46a/spraa46a.pdf

    These are created because your routine is calling library functions that are sitting in different memory segments, which would require a long jmp. Therefore, if you want to have your entire function running from SRAM, you will have to move the relevant library functions to there as well (or the entire library).

    I am moving this thread to compiler as they may have additional insights regarding workarounds and the use of trampolines.

    Cheers,

    Rafael