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.

Placing driver functions in seperate memory section

Hello,

While using any driver in our code (like fftc driver), is there any possibility to place each function of a driver file into different memory section. How could we do that?

Regards

Naveen

  • The following lines belong in the SECTIONS directive of your linker command file.  They cause all of the functions from the files src1.c and src2.c to be collected into an output section named special_section, then allocated to a memory range named SPECIAL_MEMORY.

         special_section {
              src1.obj(.text)
              src2.obj(.text)
         } > SPECIAL_MEMORY

    Thanks and regards,

    -George

  • Yes we can move the src code of file in this way. But my basic requirement is to move some specific functions from a file into L2SRAM and remaining functions into some external memory. Can you please suggest some options?

    Regards

    Naveen

  • Another technique requires two steps.  First, build the C code with the compiler option --gen_func_subsections.  That places each function in a subsection named after the function, such as ".text:name_of_function".  Second, in your link command file you can write something like ...

         .text:name_of_function > SPECIAL_MEMORY

    Thanks and regards,

    -George