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.
Hi All,
I am using TMS30F2812 MCU.
I am running my application from flash memory. However, 2 variables are copied in RAM.
For copying variables in RAM, i have written following code:
In Main.c
#pragma DATA_SECTION(tTMS320F2812ECanaTransactionParameterDataObject, "RamParameterDataObject")
volatile t__TMS320F2812ECanaTransactionParameterDataObject tTMS320F2812ECanaTransactionParameterDataObject;
#pragma DATA_SECTION(tTMS320F2812ECanaTransactionStatusFlags, "RamTransactionStatusFlags")
volatile t__TMS320F2812ECanaTransactionStatusFlags tTMS320F2812ECanaTransactionStatusFlags;
/* Initialize the RamParameterDataObject section */
memcpy(&u16RamParameterDataObject_RunStart, &u16RamParameterDataObject_LoadStart, (Uint32)&u16RamParameterDataObject_LoadSize);
/* Initialize the RamTransactionStatusFlags section */
memcpy(&u16RamTransactionStatusFlags_RunStart, &u16RamTransactionStatusFlags_LoadStart, (Uint32)&u16RamTransactionStatusFlags_LoadSize);
In Main.h
extern Uint16 u16RamParameterDataObject_LoadStart;
extern Uint16 u16RamParameterDataObject_LoadSize;
extern Uint16 u16RamParameterDataObject_RunStart;
extern Uint16 u16RamTransactionStatusFlags_LoadStart;
extern Uint16 u16RamTransactionStatusFlags_LoadSize;
extern Uint16 u16RamTransactionStatusFlags_RunStart;
In F2812.cmd
/*** User Defined Sections ***/
RamParameterDataObject: LOAD = FLASHC, PAGE = 0
RUN = RAMM0, PAGE = 1
LOAD_START(_u16RamParameterDataObject_LoadStart),
LOAD_SIZE(_u16RamParameterDataObject_LoadSize),
RUN_START(_u16RamParameterDataObject_RunStart)
RamTransactionStatusFlags: LOAD = FLASHC, PAGE = 0
RUN = RAMM0, PAGE = 1
LOAD_START(_u16RamTransactionStatusFlags_LoadStart),
LOAD_SIZE(_u16RamTransactionStatusFlags_LoadSize),
RUN_START(_u16RamTransactionStatusFlags_RunStart)
I have followed the procedure mentioned in application note SPRA958L.pdf. Section 4.6.2, page 19 and page 20.
Still i am getting following warnings:
#10083-D LOAD placement ignored for "RamParameterDataObject": object is uninitialized
#10083-D LOAD placement ignored for "RamTransactionStatusFlags": object is uninitialized
Please suggest way to suppress the warning.
Thank you,
Sunil Sawant
Hi Sunil,
Please refer this doc for copying sections from Flash to RAM while execution:
Regards,
Gautam