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.

run placement fails for object "ramfuncs"

I have tried to call one "passing structure to a function" and some if else condition inside one function called RadFault(void); And the faultmanagement() function is in 

#pragma CODE_SECTION(ReadFault, "ramfuncs2");
void ReadFault(void){

Read fault sub routine 1,

Read fault sub routine 2;

|

|

|

[called function(&Vgph,&Vgll)

some logic added]

Read fault sub routine n;

}

But I am getting followng error "run placement fails for object "ramfuncs""

My question is why this is coming and how to solve this?

If I add some random code I am not getting any error. But whenever I tried to call some function and try to take some decision from that function output I am getting this error.

  • Amitabha,

    Can you provide more detail on what exactly the error message is?  There should be more information in the build console.  At first thought, I'd speculate that the section will not fit in the amount of memory available where you've linked it.  But this is just a guess.  We need more information.

    Regards,

    David

  • Dear David,

    Thanks for ur reply.

    I m getting attached error

  • There are many functions written on ramfuncs, and ramfuncs2. I just randomly moved couple of those function from ram to flash by commenting" //#pragma CODE_SECTION " . Now I am not getting any error. I am afraid what will the be implication of this in my system.

    FYI, I am new in embedded C programming. I am basically an analog power electronic engineer and now exploring embedded firmware on C2000(TMS320F2833X) platform. I am trying to modify and add more functions in some existing code. I am developing prototype firmware on TI explorer board only.

  • Amitabha,

    Amitabha Mallik said:

    I m getting attached error

    The error is telling you that the sections ramfuncs and ramfuncs2 will not fit in the available memory that you are trying to link them to.  ramfuncs is size 0x1037 words, but there is only 0x1000 words unused in RAML1.  Similar for ramfuncs2.

    You need to link the sections to a RAM block that can fit them.

    Regards,

    David

  • Could u pls help me how to do that?
  • Amitabha,

    You need to edit the linker .cmd file that you are using to place these sections.  You may have more than one .cmd file in your project.  For example, there may be one called DSP2833x_Headers_nonBIOS.cmd.  That one is for the peripheral header file structures, and is not the one you want.  You want the one that that specifies the RAM and FLASH, and then links the sections to these memories.

    Since you've moved some of your sections out of the ramfuncs/ramfuncs2 and obtained a successful build, look at the .map file created by the linker in examine the memory usage.  You can identify where you have free RAM in your system.  Then you can adjust the .cmd file to link ramfuncs and ramfuncs2 to larger available memory.

    Regards,

    David