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.

Allocation of code in memory

Hello,

I am writing on omapl137 (the DSP part) and using DSPBIOS configuration.

The code is getting bigger, and I need a certain functions be in IRAM instead of SDRAM as they allocated there by DSP BIOS (probably) [*-)].

The question is how do I define a function to be executed form IRAM?

I canot define entire .text in since its big, and when I try to create a memory space in  .cmd file it is getting overriten by DSP BIOS.

As someone explained to me I need to define a section in memory in IRAM, the use:

#pragma CODE_SECTION(function,memory_space);

I just dont know how to define memory section. Please help.

 

Regards

Arye

  • As you can not add a custom section in the .cmd file generated by DSP/BIOS, you will need to have a second .cmd file containing the lines below:

    SECTIONS
    {    
        memory_space >   IRAM

    }

    So your project will have 2 .cmd files, the one generated by DSP/BIOS and your custon/extra one.