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.

How to move the assembly file to particular section while linking the code?

Dear Team,

 I am using fir filter provided by dsplib, as the library claims i am getting almost same profiling figure (number of cycles for filtering one sample) when i do it separately.

But when i integrate with our project i am getting more time for execution because the code is sitting in external RAM. So I want to move the fir filter code which is in assembly (assembly file) to internal RAM, I need to know how it can be done?

In C language using #pragma it can be accomplished if the code is C. But how to do it in assembly for C5515?

Please provide the response asap.

Thanks and Regards,

Ameen

  •  There are two ways to do this.

    For the first way, find where the the assembly has the directive:

         .text

     and replace it with:

        .sect  "my_section_name" 

     

  •  

    The second way is via the linker command file.  In the SECTIONS area, create a new section, similar to this (assumes your module is my_filter, and the MEMORY section is FAST_RAM):

    SECTIONS

    {

        .fast_text:  > FAST_RAM

        {

            my_filter.obj(.text)       /* link the text section from my_filter */

        }

    }

     

     This has the advantage of not requiring a code edit, but I have had problems where I had to specify the complete path of the object file, which I considered unworkable.  YMMV.

    Regards,

    Bill 

     

     

  • Thanks Bill. I will try and come back if there are any queries. I proceed with first method.

    Regards,

    Ameen