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.

TMS320F28388D: #pragma DATA_SECTION and #pragma RETAIN; seems like they don't working with IPCMSGRAM

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE

Hello,

I am currently working on a project using the TMS320F28388D, and I'm encountering an issue with initializing a constant array in a specific memory section. My goal is to load a predefined const array into the CPU1_TO_CM_MSGRAM1, which is located at the address 0x39400.

For reference, I am following the example provided in C2000Ware_5_00_00_00\driverlib\f2838x\examples\c28x_cm\flash_kernel, specifically the file named "flash_kernel_c28x_cm_ex1_sci_boot_cpu1.c".

While debugging this using Code Composer Studio (CCS), I noticed that the memory at 0x39400 on CPU1 only contains zeros (0x0000), instead of the expected array values.

In the first section of my code, I have declared the array as follows:

 
#pragma DATA_SECTION(CopyDataToCMRAM, "MSGRAM_CPU_TO_CM_COPY_TO_S0_RAM")
#pragma RETAIN(CopyDataToCMRAM) const uint16_t CopyDataToCMRAM[138] = { 0xB500, ..., 0x400F };

In the linker command file (.cmd), I have divided the CPU1TOCMRAM into two sections:

 
CPUTOCMRAM_0 : origin = 0x039000, length = 0x000400
CPUTOCMRAM_1 : origin = 0x039400, length = 0x000400

Additionally, the .cmd file specifies:

 
MSGRAM_CPU_TO_CM > CPUTOCMRAM_0, type=NOINIT
MSGRAM_CPU_TO_CM_COPY_TO_S0_RAM > CPUTOCMRAM_1, type=NOINIT

I've observed that when I comment out the #pragma DATA_SECTION(CopyDataToCMRAM, "MSGRAM_CPU_TO_CM_COPY_TO_S0_RAM"), the array is correctly located in the LSRAM and initialized as expected.

My question is: How can I properly initialize an array into the IPC MSGRAM from CPU1 to CM on the 28388D?

Thanks in Advance.

B.D.