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.

TMS320F28379D: Adding Flash API to RAM

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hi team ,

We are working on F28379D Launch pad , We need to run FLASH api through RAM could you please help us .


We Tried in below method : 

main.c

extern uint16_t Flash_API_LoadStart;
extern uint16_t Flash_API_LoadEnd;
extern uint16_t Flash_API_RunStart;
extern uint16_t Flash_API_LoadSize;

void CopyFlashAPIToRAM(void)
{
uint16_t *loadAddr = (uint16_t *)&Flash_API_LoadStart;
uint16_t *runAddr = (uint16_t *)&Flash_API_RunStart;
uint16_t loadSize = (uint32_t)&Flash_API_LoadEnd - (uint32_t)&Flash_API_LoadStart;

memcpy(runAddr, loadAddr, loadSize);
}
void load(char *load,char *start, uint16_t size)
{ do
{
*start = *load;
start++;
load++;
} while (--size);
}

load((char *)&Flash_API_LoadStart,
(char *)&Flash_API_RunStart,
(uint16_t)&Flash_API_LoadSize);



.cmd file:

FlashAPIcode : LOAD = FLASHD,
               RUN = RAMGS14,
               LOAD_START(Flash_API_LoadStart),
               LOAD_END(Flash_API_LoadEnd),
               LOAD_SIZE(Flash_API_LoadSize),
               RUN_START(Flash_API_RunStart),
               RUN_END(FlashApi_RunEnd),
               RUN_SIZE(FlashApi_RunSize),
               PAGE = 0, ALIGN(8)

Kindly Suggest the correction or steps to do that.


Thanks and Regards
Madan Mohan N