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 copy library function from Flash to RAM?Emegency!ple help



 In my embedded controller application,In order to improve execution speed I would like to copy the function of F280X_BDC_PWM_Update

which in the library F280xDRV_ml.L28 from Flash to RAM.

1, The library path is C:\tidcs\DMC\c28\v32x\lib\drvlib280x\lib\F280xDRV_ml.L28

2,The function of F280X_BDC_PWM_Update will be put in .text.(flash)

3, And then be copped to ramfuncs and run in ram

4, The .cmd is as bellow.

5, How shall I do? Such as how to rewrite the .cmd?etc.

Best regard,

xufeihx

 

 


MEMORY
{
PAGE 0:    /* Program Memory */
   L0SARAM     : origin = 0x008000, length = 0x001000     /* 4Kw L0 SARAM .Run RamFuncs*/
   FLASH_ABCD  : origin = 0x3E8000, length = 0x00FF80     /* 64kW FLASH, Sectors A, B, C, and D combined */

 PAGE 1 :   /* Data Memory */
   M0SARAM     : origin = 0x000002, length = 0x0003FE     /* 1Kw M0 SARAM .For .bss,.ebss,.cio,.sysmem,.esysmem*/
   M1SARAM     : origin = 0x000400, length = 0x000400     /* 1Kw M1 SARAM .For.stack */
   L1SARAM     : origin = 0x009000, length = 0x001000     /* 4Kw L1 SARAM .No used*/
}

 
SECTIONS
{
/*** Compiler Required Sections ***/
  /* Program memory (PAGE 0) sections */
   .text             : > FLASH_ABCD,        PAGE = 0
 

   ramfuncs          :   LOAD = FLASH_ABCD, PAGE = 0                /* Used by InitFlash() in SysCtrl.c */
                         RUN = L0SARAM,     PAGE = 0
                         LOAD_START(_RamfuncsLoadStart),           /*ref:F2808.CMD*/
                         LOAD_END(_RamfuncsLoadEnd),
                         RUN_START(_RamfuncsRunStart)

}