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.
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.
Hi B.D,
Our SME is currently OOO till 30th Oct, he will revert once he resumes office.
Thanks & Regards,
Rajeshwary
Hi,
I am unable to reproduce the issue that you are seeing.
Taking the same example "flash_kernel_c28x_cm_ex1_c28x1" and loading the binary on the device , the array is initialized correctly.
Best Regards
Siddharth
Hi Siddharth Deshpande,
I am still unable to locate the CopyDataToCMRAM array at 0x39400, even after loading the example.
I have verified that the array is being properly initialized and copied to both GSRAM and LSRAM.
Currently, I am manually copying the CopyDataToCMRAM array, which I have redirected for storage in LSRAM, to 0x39400 prior to the bootCM procedure.
This workaround strikes me as somewhat unusual.
Hi Siddharth Deshpande.
I've successfully managed to copy arrays to their precise locations, whether it's from CPU1 to CPU2 or CPU1 to CM MSGRAM.
Previously, I was working with CCS v11.2, but after switching to v12.5, I've found that it functions flawlessly.